[Gc] Re: heapsize == blocks_in_use_bytes * 40
megacz at cs.berkeley.edu
Thu Oct 12 13:51:26 PDT 2006
Thank you for your quick reply!
> You really want to put a breakpoint in GC_expand_hp_inner and try
> to understand from the stack trace why the heap is growing.
> You want to ignore the initial "reasonable" heap expansions, and
> look at one of the last ones. If your application allocates and
> drops very large arrays, this sort of thing can happen due to
Well, there are quite a few rapid array allocation/deallocations in
the ~3mb range. These are certainly large arrays, but could they
cause fragmentation-leakage on the order of >160mb?
> (-DUSE_MUNMAP may be a workaround.)
Is this supported on Win32? I had to kludge it a bit to get it to
build, but it doesn't appear to be doing anything.
>> The GC reports the heapsize (which I interpret to mean the quantity of
>> memory allocated from the OS) to be 160MB, yet the "bytes=" line
>> (which I interpret to mean the amount of memory allocated by the
>> application) as around 4.5mb.
Could you confirm that my understanding of the "bytes=" line is
correct? Does that line from the GC log really indicate the number of
GC-heap bytes that have been allocated to the application? It seems a
bit low in this situation, but I guess that could be because we're
used to assuming the ~160mb is actual usage.
Thanks again for your help,
PGP/GPG: 5C9F F366 C9CF 2145 E770 B1B8 EFB1 462D A146 C380
More information about the Gc