32位程序在64位操作系统上运行内存消耗

发布于 2024-09-26 01:12:03 字数 199 浏览 2 评论 0原文

我们有一台windows server 2008 R2 32G内存的机器,这显然是64位操作系统。我们安装了XAMPP 32位版本,带有32位MySQL和PHP。然后我们在上面托管一个用 PHP 编写的网络邮件系统。我的问题是:那些32位MySQL和32位PHP会消耗超过4G的操作系统内存吗?我们必须安装 64 位 MYSQL 和 PHP 才能达到这个结果吗?

谢谢

We have a windows server 2008 R2 32G memory machine, this is obviously a 64bit OS. And we installed XAMPP 32bit version, with 32bit MySQL and PHP. Then we host an webmail system written in PHP on it. My question is : will those 32bit MySQL and 32bit PHP consume more than 4G memory of the OS ? Do We have to install 64bit MYSQL and PHP to achive this result ?

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

病女 2024-10-03 01:12:03

基于 x86 架构指令集,以 32 位编译的软件将永远无法分配超过 4GiB,因为它们无法直接访问此内存。由于它们使用 32 位来表示内存地址,并且由于 2^32 = 4GiB(四舍五入),因此它们将无法进一步表示任何地址。

顺便说一句,通过使用 PAE,软件可以在 32 位系统上间接使用超过 4GiB 的内存,但必须明确开发软件才能使用它。

您需要每个软件及其库的 64 位版本,否则即使操作系统识别您的所有内存,您也将无法直接使用超过 4GiB 的空间。

Based on the x86 architecture instruction set, a software compiled in 32 bits won't ever be able to allocate more than 4GiB since they won't be able to access this memory directly. As they use 32 bits to represent memory addresses, and since 2^32 = 4GiB (rounded), they won't be able to represent any address further.

On a side note, a software could indirectly work with more than 4GiB of memory on a 32 bits system by using PAE, but the software must be explicitly developed to use this.

You need the 64 bits version of every software and their libraries otherwise you won't be able to use more than 4GiB directly, even if the OS recognize all your memory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文