This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

64-bit program memory usage


I recently re-compiled my old C code to 64-bit on Solaris 8
using gcc 3.2.0 with -m64 switch. It turns out that the 64-bit version uses
twice as much memory as the 32-bit counterpart does. My program reads
large data files into memory so memory usage is big concern. With one 
of my testcases, the 32-bit uses 2.1G while the 64-bit uses 4G memory.

I do use pointers intensively as I need to store them in binary
tree type of structure. Is that the reason why memory usage gets doubled
(since pointers are all 64bit now)? Any cure?

Thanks,

NJ


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]