[kaffe] Garbage Collection Questions

Guilhem Lavaux guilhem at kaffe.org
Thu Aug 3 05:09:55 PDT 2006

Hi Michael,

The author of JamVM is trying to implement this behaviour. It is
strongly in development and probably CPU intensive when the heap is
shrinked because you have to update all pointers in your memory. This is
a somewhat complicated procedure as you have to scan the heap for all
pointers (or to keep them at hand for future modification) and update
your data structures consequently so the development/debugging stage
will be quite high too. My opinion is that it is a lower priority for
kaffe at the moment as we have some other features to implement before
looking into this area (performance, portability and better
implementation of the basic java vm standard). If you feel sufficiently
confident however you are welcome to submit something about it. ;-)


Michael Franz wrote:
> Hi,
> I have gotten my answers on IRC, but thought I would also ask here. 
> Some background on my problem.
> I have a need for a Java application to load a large amount of data. 
> Larger than is normal, I can load it into the JVM my using the correct
> -Xmx values.  The issues is that after I have loaded the data and
> performed whatever logic I need to I want to discard the memory that
> was used.  The JVM will garbage collect the objects, but the JVM has
> allocated the largest amount of memory it could from the OS.  What I
> want to occur is to have the JVM (eventually) release this memory back
> to the OS.  It would not have to be immediate, but it should be
> release within a reasonable amount of time.  From my research Sun's
> implementation does not ever release memory back to the OS.  I guess
> for server side processes this is ok, but for a desktop application
> that needs to play well with other applications (not all Java) it is
> not ideal.
> The garbage collector can release the memory.  What kind of algorithms
> would be good candidates for determining when and how much should be
> released?
> Has anyone done and research on this topic?  Or actually implemented
> this type of functionality in a branched version of Kaffe?  Is there
> any JVM that currently does this?
> Michael
> ------------------------------------------------------------------------
> _______________________________________________
> kaffe mailing list
> kaffe at kaffe.org
> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

More information about the kaffe mailing list