javax.realtime
Class VTMemory

java.lang.Object
  |
  +--javax.realtime.MemoryArea
        |
        +--javax.realtime.ScopedMemory
              |
              +--javax.realtime.VTMemory

public class VTMemory
extends ScopedMemory

The execution time of an allocation from a VTMemory area may take a variable amount of time. However, since VTMemory areas are not subject to garbage collection and objects within it may not be moved, these areas can be used by instances of NoHeapRealtimeThread.


Field Summary
(package private)  java.lang.Runnable logic
          The logic associated with this
 
Fields inherited from class javax.realtime.ScopedMemory
portal
 
Fields inherited from class javax.realtime.MemoryArea
constant, heap, id, memoryConsumed, nullClassArr, nullMem, nullObjArr, scoped, shadow, size
 
Constructor Summary
VTMemory()
          Alternate constructor, with no limits
VTMemory(long initialSizeInBytes, long maxSizeInBytes)
          Creates a VTMemory with the given parameters.
VTMemory(long initialSizeInBytes, long maxSizeInBytes, java.lang.Runnable logic)
          Creates a VTMemory with the given parameters.
VTMemory(javax.realtime.SizeEstimator initial, javax.realtime.SizeEstimator maximum)
          Creates a VTMemory with the given parameters.
VTMemory(javax.realtime.SizeEstimator initial, javax.realtime.SizeEstimator maximum, java.lang.Runnable logic)
          Creates a VTMemory with the given parameters.
 
Method Summary
 long getMaximumSize()
          Gets the value of the maximum size to which this can grow.
protected  void initNative(long sizeInBytes)
          Initialize the native component of this VTMemory.
 java.lang.String toString()
          Create a string representing the name of this.
 
Methods inherited from class javax.realtime.ScopedMemory
checkAccess, checkNewInstance, enter, enter, getOuterScope, getPortal, getReferenceCount, join, join, joinAndEnter, joinAndEnter, joinAndEnter, joinAndEnter, setPortal, setupMemBlock
 
Methods inherited from class javax.realtime.MemoryArea
bless, enterMemBlock, executeInArea, exitMemBlock, getMemoryArea, memoryConsumed, memoryRemaining, newArray, newArray, newArray, newArray, newInstance, newInstance, newInstance, newInstance, postSetup, preSetup, registerFinal, shadow, size, startMem, stopMem, throwIllegalAssignmentError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logic

java.lang.Runnable logic
The logic associated with this

Constructor Detail

VTMemory

public VTMemory(long initialSizeInBytes,
                long maxSizeInBytes)
Creates a VTMemory with the given parameters.


VTMemory

public VTMemory(long initialSizeInBytes,
                long maxSizeInBytes,
                java.lang.Runnable logic)
Creates a VTMemory with the given parameters.

Parameters:
logic - An instance of java.lang.Runnable whose run() method will use this as its initial memory area.

VTMemory

public VTMemory(javax.realtime.SizeEstimator initial,
                javax.realtime.SizeEstimator maximum)
Creates a VTMemory with the given parameters.

Parameters:
initial - The size in bytes of the memory to initially allocate for this area.
maximum - The maximum size in bytes of this memory area to which the size may grow estimated by an instance of SizeEstimator.

VTMemory

public VTMemory(javax.realtime.SizeEstimator initial,
                javax.realtime.SizeEstimator maximum,
                java.lang.Runnable logic)
Creates a VTMemory with the given parameters.

Parameters:
initial - The size in bytes of the memory to initially allocate for this area.
maximum - The maximum size in bytes of this memory area to which the size may grow estimated by an instance of SizeEstimator.
logic - An instance of java.lang.Runnable whose run() method will use this as its initial memory area.

VTMemory

public VTMemory()
Alternate constructor, with no limits

Method Detail

getMaximumSize

public long getMaximumSize()
Gets the value of the maximum size to which this can grow.

Overrides:
getMaximumSize in class ScopedMemory
Returns:
The maximum size value.

toString

public java.lang.String toString()
Create a string representing the name of this.

Overrides:
toString in class ScopedMemory
Returns:
A string representing the name of this.

initNative

protected void initNative(long sizeInBytes)
Initialize the native component of this VTMemory.

Specified by:
initNative in class MemoryArea