This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
How to debug the GC
- From: Jost Boekemeier <JBoekemeier at inetsoftware dot de>
- To: "'java at gcc dot gnu dot org'" <java at gcc dot gnu dot org>
- Date: Tue, 17 Jun 2003 18:16:36 +0200
- Subject: How to debug the GC
It seems that when running our application within gcj, it leaks memory.
Basically we instantiate an object, the object then creates an array of java
objects (ca. 100 MB altogether) and then flattens everything into a
byte-array. Within our tests the byte-array and the object itself are
discarded.
For each new round ca. 200K (sometimes more, sometimes less) are missing so
that after some time the GC will allocate a new chunk from the OS. -- This
does not mean that there is a bug within the GC; we use several native
methods which may cause this.
Does anyone have a tip how to debug this kind of problem? In gcj how do I
access the list of referenced objects?
Btw: I've taken a short look at the GC and it seems that the GC does never
release memory back to the operating system, does it?
Jost