Runtime.getRuntime().maxMemory() = -Xms + -Xmx

W

Wenbo

It looks to me that Runtime#maxMemory() never returns -Xmx, which is
mentioned at many places .. even Sun's document (not javadoc or spec
though)..

From what I saw, it is actually equal to the sum of -Xms and -Xmx runtime
settings ..

I am using Solaris 1.4.2 .. JDK .. and am I missing anything here?

- Wenbo
 
M

Michael Borgwardt

Wenbo said:
It looks to me that Runtime#maxMemory() never returns -Xmx, which is
mentioned at many places .. even Sun's document (not javadoc or spec
though)..

From what I saw, it is actually equal to the sum of -Xms and -Xmx runtime
settings ..

I don't think so. Note that the -Xmx parameter just specifies the size of the memory
allocation pool from which objects (and maybe thread stacks) are allocated, but
NOT the space the JVM itself takes. The latter may conincide with your -Xms setting
but should not vary.
 
W

Wenbo

You're probably right .. the maxMemory always adds 64MB to -Xmx on the
Solaris 1.4.2 JDK implementation ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top