Displays memory statistics. Interpretation of memory usage statistics are beyond the scope of this document. For display purposes, some of the repetitive portions of the examples have been omitted.
Memory alone provides a simple display.
memory max 65088K used 9336K, free 464K, nodes: total allocated 7441 namespace 3604 Maps: funcs 0, xpath 0 Heap: init 0K, used 8932K, commit 9336K, max 65088K Non-Heap: init 28864K, used 22852K, commit 32096K, max 118784K Garbage Collection Info Name: Copy Collection count: 203 time: 454ms Name: MarkSweepCompact Collection count: 0 time: 0ms
Memory detail yields a far more complete display.
memory max 65088K used 9336K, free 899K, nodes: total allocated 7441 namespace 3604 Maps: funcs 0, xpath 0 Heap: init 0K, used 8438K, commit 9336K, max 65088K Non-Heap: init 28864K, used 22860K, commit 32096K, max 118784K Garbage Collection Info Name: Copy Collection count: 204 time: 455ms Memory Pools: Eden Space Survivor Space Name: MarkSweepCompact Collection count: 0 time: 0ms Memory Pools: Eden Space Survivor Space Tenured Gen Perm Gen Perm Gen [shared-ro] Memory Pools Info Name: Code Cache Usage: init 192K, used 1613K, commit 1632K, max 32768K Peak Usage: init 192K, used 1613K, commit 1632K, max 32768K Type: Non-heap memory Memory Manager Names: CodeCacheManager Name: Eden Space - - Name: Perm Gen [shared-rw] Usage: init 12288K, used 5821K, commit 12288K, max 12288K Collection Usage: init 12288K, used 0K, commit 0K, max 12288K Peak Usage: init 12288K, used 5821K, commit 12288K, max 12288K Type: Non-heap memory Memory Manager Names: MarkSweepCompact
Java memory is under control of the system, and generally falls into four major categories.
Field | Definition |
---|---|
init | Represents the initial amount of memory (in bytes) that the Java virtual machine requests from the operating system for memory management during startup. The Java virtual machine may request additional memory from the operating system and may also release memory to the system over time. The value of init may be undefined (0) on some platforms. |
used | Represents the amount of memory currently used. |
committed | Represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine. The amount of committed memory may change over time (increase or decrease). The Java virtual machine may release memory to the system and committed could be less than init. Committed will always be greater than or equal to used. |
max | Represents the maximum amount of memory (in bytes) that can be used for memory management. Its value may be undefined. The maximum amount of memory may change over time if defined. The amount of used and committed memory will always be less than or equal to max if max is defined. A memory allocation may fail if it attempts to increase the used memory such that used > committed even if used <= max would still be true (for example, when the system is low on virtual memory). |
iWay Software |