-
1. Re: Real Memory and JBoss on a Mac
peterj Jan 24, 2008 5:58 PM (in response to sammcgee)I assume that "Real Memory" is the current size of the Java object heap, and that "Used" reflects the amount of the heap in use at the time. In which case what you are seeing makes sense, especially if you are not setting min and max heap to the same value. (In other words, once the JVM uses some memory for the heap, it never gives it back to the OS, thus "Real Memory" will never drop.) "Allocated" might reflect how much memory the JVM has ask for, though not being familiar with the tool you are using I could not say. (Usually, the JVM will not use all of the heap memory it asks the OS for because it will run a major collection long before it has used up all of the heap, thus there is always a portion of the memory that has been requested that is never used, though the OS still keeps it in reserve just in case the JVM actually will use it at some point.)
My preferred mechanism to view the heap usage is to set -verbose:gc JVM option on the command line and analyze that output from it. This gives me a better idea of how the heap is growing, and can also be used to detect a possible memory leak.