Depends on the JVM.

In general the JVM only looks for more memory (up to -Xmx) when it needs
it, so consider that to be the peak requirement (not peak usage as the JVM
will always ask for more than usage on the basis that it needs room to
allocate objects)

If you run Maven with -Xmx2048m you will remove the pressing need for GC,
but the total memory might still only be 188MB as that may just have been
the largest amount of that 2048MB that the JVM needed at some point in time
during the build


On 27 November 2012 09:00, Anders Hammar wrote:

So the second figure isn't affected by Maven?


On Tue, Nov 27, 2012 at 9:44 AM, Olivier Lamy wrote:

2012/11/27 Anders Hammar <anders@hammar.net>:
How do I interpret the "Final Memory" reported by Maven? "66M/188M" for
example, what does each of the figures mean?
Runtime r = Runtime.getRuntime();
long MB = 1024 * 1024;
"Final Memory: " + ( r.totalMemory() - r.freeMemory() ) / MB + "M/" +
r.totalMemory() / MB + "M"

human readable :-)
used memory/total memory

Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
groupdev @
postedNov 27, '12 at 8:38a
activeNov 27, '12 at 9:13a



site design / logo © 2021 Grokbase