This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
64-bit program memory usage
- From: Ning Jin <ning at vitesse dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 17 Jun 2003 18:28:36 -0600 (MDT)
- Subject: 64-bit program memory usage
- Reply-to: Ning Jin <ning at vitesse dot com>
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