6.8.0.x, 64 bits, and memory profiling

Simon Marlow simonmarhaskell at gmail.com
Mon Nov 5 11:16:06 EST 2007

Ketil Malde wrote:

> I'm using heap profiling on AMD64, and I am getting some slightly
> strange results.  Running the profiling, 'top' shows about 600Mb in
> use, but the resulting profile shows ~80Mb.  Rerunning with -M200M
> results in an out-of-memory error. 
> Could it be that the profile is calculated incorrectly for 64bit
> systems? 

It's probably correct.  Profiling overheads add 50-100% to the space usage, 
which is subtracted from the profile.  Copying GC will use about 3x the 
live data in normal operation: 2x due to the copying, and an extra 1x to 
allocate into, plus there may be some free memory due to fragmentation 
(hopefully not much).  The +RTS -sstderr  will give you an accurate figure 
of how much memory GHC's allocator is using.


More information about the Glasgow-haskell-users mailing list