F
Frank D. Greco
In the 1.4.2 java.lang.Runtime class, there are 3 methods that
return memory values:
totalMemory(), freeMemory() and maxMemory()
[maxMemory() seems to be new for 1.4.2]
The javadocs say:
totalMemory() - total amount of memory in the JVM... the total amount of
memory currently available for current and future objs.
maxMemory() - max amount of memory that the JVM will attempt to use.
freeMemory() - free heap memory in the JVM.
What is the difference between maxMemory() and totalMemory()? And why
does "-XmxNNNN" increase the value of maxMemory() but not totalMemory()?
Thanks,
Frank
+=========================================+
| Crossroads Technologies Inc. |
| Enterprise Java Engineering |
| Web: www.CrossroadsTech dot com |
| Email: fgreco @ crossroadstech dot com |
+=========================================+
return memory values:
totalMemory(), freeMemory() and maxMemory()
[maxMemory() seems to be new for 1.4.2]
The javadocs say:
totalMemory() - total amount of memory in the JVM... the total amount of
memory currently available for current and future objs.
maxMemory() - max amount of memory that the JVM will attempt to use.
freeMemory() - free heap memory in the JVM.
What is the difference between maxMemory() and totalMemory()? And why
does "-XmxNNNN" increase the value of maxMemory() but not totalMemory()?
Thanks,
Frank
+=========================================+
| Crossroads Technologies Inc. |
| Enterprise Java Engineering |
| Web: www.CrossroadsTech dot com |
| Email: fgreco @ crossroadstech dot com |
+=========================================+