GC/Heap usage
Rutger Ovidius
r_ovidius@eml.cc
Sun Nov 14 22:53:00 GMT 2004
Monday, November 8, 2004, 9:15:53 AM, you wrote:
BM> Rutger Ovidius wrote:
>>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.
>>>>
BM> I don't know a lot about Windows memory management, but it might be that
BM> "Mem usage" is the total virtual address space allocated by the app
BM> while "VM size" represents the memory actually used (ie: the equivalent
BM> of Resident set size in linux). Cursory speculation: Perhaps our GC on
BM> Windows is a bit greedy and allocates more address space than it
BM> actually needs?
BM> Bryce
The GC mentions a USE_MUNMAP define. Is this what I want? I don't
know what USE_MMAP means and the doc/*'s aren't helping.
Has anyone tried this on win32?
I tried to define it (along with USE_MMAP because of the following),
but it does not work when compiling for mingw since mingw-runtime
doesn't have a "sys/mman.h".
os_dep.c:
# ifndef USE_MMAP
--> USE_MUNMAP requires USE_MMAP
# endif
# include <sys/types.h>
# include <sys/mman.h>
# include <sys/stat.h>
# include <errno.h>
#endif
Maybe I'm on the wrong track. Any tips?
Regards,
Rutger Ovidius
More information about the Java
mailing list