Speaking of runtime options

Boehm, Hans hans_boehm@hp.com
Mon Jan 28 12:04:00 GMT 2002

> From: Nic Ferrier [mailto:nferrier@tapsellferrier.co.uk]
> The heap options have the wrong symbols (in Sun's tools they are Xmx
> and Xms).
In the case of mx or Xmx, I believe they also have somewhat different
semantics.  Gij, like other gcj-compiled executables, or C executables
default to essentially unlimited heap size.  (The default configuration
becomes clearly suboptimal for heaps > about 0.5GB, but I expect it would
usually still work.) You run out of memory when you exceed kernel limits.
Thus the gij option is used to artificially retrict the interpreter to less
memory.  Under Linux, I think this isn't terribly useful, since you could
usually also use "limit datasize" in the shell.  (They're not quite the
same, but close.)  There is no way to raise the collectors default heap size
limit at run time, though you can impose a real limit.

I believe the most common use for the -Xmx option with the Sun VM is to
increase the maximum heap size from a smallish default.

Probably the most compatible solution is to ignore -Xmx, perhaps after
issuing a warning, and keep the gij heap limit option distinct.  I think -ms
and -Xms have similar semantics.


More information about the Java mailing list