The javadoc doesn't expalin the difference between max memory and total memory, 
and assumes that you undertsand how the heap works, which you can find at 
http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html.

But to summarize.  The heap is broken up into several areas.  One of those 
areas (the permanent generation) stores class-related intormation.  Also, you 
can specifiy both a min (using -Xms) and a max (useing -Xmx) heap size.  The 
heap is automatically resized between those values, based on object allocation 
and retention (usign a fairly complex algorithm).  So, the differen heap 
statistics mean:

maxMemory - the maximum size of the heap minus the permanent generation
totalMemory - the amount of memeory currently allocated to the heap, once again 
minus the permanent generation
freeMemory - the amount of heap space available (this is out of 'totalMemory', 
not out of 'maxMemory')

If you check these stastics often while running you will see that 'max' doesn't 
change, 'total' changes occasionnally, and 'free' is probably different every 
time.




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961026#3961026

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961026
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to