Team LiB
Previous Section Next Section

MemoryMXBeanjava.lang.management

Java 5.0

This MXBean interface allows monitoring of current memory usage information for heap memory (allocated objects) and nonheap memory (loaded classes and libraries). It also allows the garbage collector to be explicitly invoked and verbose garbage-collection related output to be turned on or off.

See MemoryUsage for details on how memory usage information is returned. See also MemoryPoolMXBean for a way to obtain both current and peak memory usage for individual memory pools.

public interface MemoryMXBean {
// Public Instance Methods
     void gc( );  
     MemoryUsage getHeapMemoryUsage( );  
     MemoryUsage getNonHeapMemoryUsage( );  
     int getObjectPendingFinalizationCount( );  
     boolean isVerbose( );  
     void setVerbose(boolean value);  
}

Returned By

ManagementFactory.getMemoryMXBean( )

    Team LiB
    Previous Section Next Section