This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj/SWT gc() and memory


Heitzso wrote:

I have a SWT 3.0RC app that generates hundreds of
thousands of small short life objects, plus some larger
objects.  Run under Linux (IBM JRE) or Win (Sun JRE)
it stabilizes out around 32M.  The same code compiled
to native with gcj stabilizes around 100+M.  I need
to be able to run on old Win98 128M machines so 100+M
is too large.


On Linux, I've usually found that gcj's heap grows to around the same size or smaller than with Sun's JRE. However, your application's allocation behaviour may be different, and gcj's collector may have different heuristics to balance heap size and performance. Also, the GC may perform a bit differently on Windows. You could try limiting the heap size to 32M or so using GC_MAXIMUM_HEAP_SIZE. This may slow down your application a bit, due to more frequent GC cycles, but would be the right thing to do in a memory-constrained environment.

Regards

Bryce



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]