Looking for ideas to fix X server crash running GCJ-compiled program
Scott Gilbertson
scottg@mantatest.com
Fri Mar 7 23:51:00 GMT 2003
> You might want to combine that with a larger initial heap size (e.g. 8MB)
to avoid the frequent GCs on startup.
Thanks. I'll try that - it's much simpler than what I was thinking.
> > Hans> 2) Setting GC_max_retries to essentially infinite will
> > essentially
> > force the collector into an infinite
> > Hans> GC loop when it runs out of memory. That's usually not
> > desirable.
> >
> > The only alternative (using a max heap limit), as far as I
> > can tell, is to
> > let the application crash if a few tries doesn't get the free
> > space high
> > enough. That's not desirable either. I tried a small number
> > (5, I think)
> > and it wasn't enough -- the app crashed on "out of memory".
> That's surprising to me. The problem may be that GC_fail_count gets reset
only if you successfully allocate a large (page-sized) chunk. If it never
encounters completely empty pages, it never gets reset. I just changed that
in my version.
> Were you allocating exclusively small objects?
It's hard to be sure, because there's a lot going on, but I would think the
vast majority of short-lived objects are small. They're typically short
strings and GCs (gnu.gcj.xlib graphics contexts - not to be confused with
GCs).
More information about the Java
mailing list