views:

41

answers:

1

hi, 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

A: 

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. (They use 32 bits to represent memory addresses, and since 2^32 = 4GiB (rounded), they won't be able to represend any address further.)

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

Soravux
That's not entirely true. An OS can take advantage of [Page Address Extension](http://en.wikipedia.org/wiki/Physical_Address_Extension), although the virtual memory address space is still 4GB. (However, see the details for the specific OS restrictions/impls.)
pst
His OS is already 64 bits, and I never mentionned that an OS 32 bits may never have more than 4GiB, only that a software compiled in 32 bits may not address more than 4GiB directly. PAE mechanisms aren't implanted, to the best of my knowledge, in XAMPP.
Soravux