GC/Heap usage
Rutger Ovidius
r_ovidius@eml.cc
Mon Nov 8 16:02:00 GMT 2004
Monday, November 8, 2004, 6:44:18 AM, you wrote:
BM> Rutger Ovidius wrote:
>>Hi,
>>>>I'm looking for a way to make the gcj GC manage my heap more similarly
>>to sun's java. Heap use seems tremendously excessive with my app
>>(compared to java) and I'm out of ideas on how to keep it under
>>control.
>>>>I compile with gcj win32 gcc version 4.0.0 20041014 (experimental).
>>>>I let 3 instances of my app run for a few hours. One is gcj compiled,
>>one is normal sun's java, and one is under borland optimizeit
>>profiler.
>>>>It creates/destroys many strings and other temp objects every second
>>of use; it also uses WeakHashTable for weak references.
>>
BM> Hi Rutger,
BM> WeakHashMap could be the source of the problem. See:
BM> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16997
BM> Regards
BM> Bryce
Hi,
This may be another problem (which I _really_ hope can be corrected!
no one likes leaks :) ), but I have a feeling that it isn't the main
one. I don't have 30 megs of WeakHashMaps (or entries), and yet the
heap grows rather quickly (unlike java) until it levels off at 30 megs.
Limiting the heap to 7 megs limited the "VM Size"(in Task Manager) to
~15 megs, but the "Mem Usage" was still listed as 40 megs, which I
don't quite understand.
Regards,
Rutger Ovidius
More information about the Java
mailing list