We recently started running our C++ analysis code on 64bit SL5.3 and have been surprised to find the memory usage is about 2x what we are used when running it on 32 bits. Comparing a few basic applications like sleep(1) show similar memory usage. Others, like sshd, show only a 30% size increase (maybe that is subject to configuration differences between the two hosts).
I understand that pointers must double in size but the bulk of our objects are made of ints and floats and these are 32/64 bit-invariant. I found[1] that poorly defined structs containing pointers can bloat even on non-pointer data members due the padding needed to keep everything properly aligned. It would kind of surprise me if this is what is behind what we see. Does anyone have experience in understanding or maybe even combating this increase in a program's memory footprint when going to 64 bits? Thanks, -Brett. [1] http://www.codeproject.com/KB/winsdk/Optimization_64_bit.aspx#IDAJLKNC
smime.p7s
Description: S/MIME cryptographic signature