maximum memory for gcj-compiled executable?

Jeff Sturm jsturm@one-point.com
Mon Mar 24 00:48:00 GMT 2003


On 2003年3月23日, Erik Poupaert wrote:
> Is there any way to instruct a gcj-compiled executable to limit its memory
> consumption to a particular maximum?

Have a look at _Jv_SetMaximumHeapSize.
> I know for a fact that 1 Mb (transient) memory should be enough for a
> particular server process. I'd like the process to stick to that maximum.
> Today it bluntly continues requesting additional memory, instead of garbage
> collection what he has already, verociously inflating its consumption to a
> staggering 200 Mb, before doing the reasonable thing.

I find it helpful to run with GC_PRINT_STATS=1 and/or build boehm-gc
without -DSILENT=1 to debug memory retention problems. That'll give you
some idea when the collector is running and what it is doing.
Jeff


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /