changing the memory settings semi-dynamically vs GateKeeper and signing

Hendrik Schreiber hs at
Wed Feb 22 10:38:42 PST 2012

On Feb 22, 2012, at 5:54 AM, Andrew Thompson wrote:

> What I'd like to see is something  like
> initial heap size is ?1/64? physical memory
> maximum heap size is equal to physical memory
> With heap shrinking working, one could risk not setting Xmx and letting it be physical RAM size because even if the app temporarily uses this much memory, it'll give back when it calms down.
> But since heap shrinking does not work with most GCs, Xmx is here to stay, I fear.

Well - if Java apps memory consumption actually behaved like ordinary programs' - that would be swell!

By default, I'd probably also start with something like 1/64 of physical memory, but considering that the JVM consumes memory outside of the heap (perm, native, etc.) and that the OS and perhaps another couple of processes also need to reside in memory, I'd actually limit the maximum heap size to a little less than the physical memory. This could be a OS dependent parameter. Say phys. mem *minus* 256M or something similar.

Anyhow. I guess it does not mean much here, but here's my strong


for eliminating the need to specify heap sizes and especially making sure that Java process memory consumption actually decreases, when an oversized heap is not needed anymore. In a way, it's disrespectful to users that they have to put with this.


More information about the macosx-port-dev mailing list