2

Given that today (for performance reasons?) variables are usually aligned to the "bit-width" (I wanted to use "word-width" here, but on x86 a "word" is still 16 bits right?) of the processor, would switching from a 32 bit OS to its 64 bit version double the RAM usage?

Would this then in turn mean that to do the same work a 32 bit OS can do with 4 GB RAM (well, the 3.x GB actually...) with a 64 bit OS I would need 8 GB of RAM for programming?

Please note that I'm only talking about everyday x86 computers here.

1

5 Answers 5

4

There will generally be some increase, but rarely near double. Some info here :

http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c15711/

3
  • that seems to confirm what I was afraid of...
    – Buttercup
    Sep 20, 2009 at 20:02
  • no it does not confirm what you are afraid of. 1024 floats are still 1024 * 32bit. only the ptr pointing to that array is now 8byte instead of 4.
    – akira
    Sep 20, 2009 at 20:22
  • I'd say that if you weren't struggling for memory in the first place, switching to 64-bit won't make any major difference. The article says in most situations the difference is tiny.
    – MartW
    Sep 20, 2009 at 21:30
0

Not at all, although there is a slight overhead on a 64 bit OS the real difference is in the amount of memory they are able to use not the amount that they need. So the primary difference is that they use 64bits to store memory addresses.

0

ehh...

I have noticed that typically when you install x64 over x86 system, programs that are compiled for just x64 typically take up a bit more memory, however it is only marginal.

That being said, as always, more memory is always better!

0

The memory usage will of couse increase somewhat, but far from double. References will be twice the size, and some structures will be larger due to a different alignment, but it doesn't affect all data types. If you have a byte array, the bytes will still be stored end to end, there is no seven byte padding for each byte of data.

The word size on a 64 bit system is of course 64 bits. The x86 assembly data type WORD is still 16 bits, so a system word is a QWORD.

-1

32-bit systems use 32-bit instructions, and 64-bit systems use 64-bit instructions. In other words, the CODE part of your programs will take more space. That's only a small bit of your total memory use though. Everything else -- the DATA etc. -- won't change much; a 16-million color image is still the same amount of data, on either architecture.

1
  • 3
    Instruction size isn't usually related to address space or register size. In x86, op-codes are irregular numbers of bytes, whether it's 32 or 64-bit.
    – bobince
    Sep 21, 2009 at 0:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .