javax.realtime
Class HeapMemory

java.lang.Object
  |
  +--javax.realtime.MemoryArea
        |
        +--javax.realtime.HeapMemory

public final class HeapMemory
extends MemoryArea

The HeapMemory class is a singleton object that allows logic within other scoped memory to allocate objects in the Java heap.


Method Summary
static HeapMemory instance()
          Returns a pointer to the singleton HeapMemory space.
 long memoryConsumed()
          An exact count, in bytes, of the all of the memory currently used by the system for the allocated objects.
 long memoryRemaining()
          An approximation to the total amount of memory currently available for future allocated objects, measured in bytes.
 
Methods inherited from class javax.realtime.MemoryArea
enter, enter, executeInArea, getMemoryArea, newArray, newInstance, newInstance, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static HeapMemory instance()
Returns a pointer to the singleton HeapMemory space.
Returns:
The singleton HeapMemory object.

memoryRemaining

public long memoryRemaining()
Description copied from class: MemoryArea
An approximation to the total amount of memory currently available for future allocated objects, measured in bytes.
Overrides:
memoryRemaining in class MemoryArea
Following copied from class: javax.realtime.MemoryArea
Returns:
The amount of remaining memory in bytes

memoryConsumed

public long memoryConsumed()
Description copied from class: MemoryArea
An exact count, in bytes, of the all of the memory currently used by the system for the allocated objects.
Overrides:
memoryConsumed in class MemoryArea
Following copied from class: javax.realtime.MemoryArea
Returns:
The amount of memory consumed in bytes.