public class VTMemory extends ScopedMemory
VTMemory is similar to LTMemory except that the execution
time of an allocation from a VTMemory area need not complete in
linear time.
Methods from VTMemory should be overridden only by methods that use
super.
In JamaicaVM, the actual size will never be increased dynamically, i.e., it remains at the initial value.
In JamaicaVM, the memory space for this VTMemory area is allocated
from the normal Java heap (HeapMemory), i.e., it is not depending on an
external memory source such as a call to the C function malloc() .
This implies that the creation of a VTMemory may fail if the
available memory on the Java heap is low.
| Constructor and Description |
|---|
VTMemory(long size)
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (size, size, null). |
VTMemory(long initialSizeInBytes,
long maxSizeInBytes)
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (initialSizeInBytes, maxSizeInBytes, null). |
VTMemory(long initialSizeInBytes,
long maxSizeInBytes,
Runnable logic)
Creates a
VTMemory with the given parameters. |
VTMemory(long size,
Runnable logic)
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (size, size, logic). |
VTMemory(SizeEstimator size)
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (size, size, null). |
VTMemory(SizeEstimator size,
Runnable logic)
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (size.getEstimate(), size.getEstimate(), logic). |
VTMemory(SizeEstimator initial,
SizeEstimator maximum)
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (initial.getEstimate(), maximum.getEstimate(), null). |
VTMemory(SizeEstimator initial,
SizeEstimator maximum,
Runnable logic)
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (initial.getEstimate(), maximum.getEstimate(), logic). |
| Modifier and Type | Method and Description |
|---|---|
String |
toString()
Creates a string representing this object.
|
enter, enter, executeInArea, getMaximumSize, getPortal, getReferenceCount, join, join, joinAndEnter, joinAndEnter, joinAndEnter, joinAndEnter, memoryConsumed, memoryRemaining, newArray, newInstance, newInstance, setPortal, sizeenter, enter, enter, enter, enter, executeInArea, executeInArea, executeInArea, executeInArea, executeInArea, getMemoryArea, mayHoldReferenceTo, mayHoldReferenceTo, newArrayInAreapublic VTMemory(long initialSizeInBytes,
long maxSizeInBytes)
VTMemory(long, long, Runnable) with the argument
list (initialSizeInBytes, maxSizeInBytes, null).
In JamaicaVM, the size of an VTMemory is not increased dynamically.
If the initial size is less than maxSizeInBytes, it will be set to
maxSizeInBytes.
IllegalArgumentException - when initialSizeInBytes is
greater than maxSizeInBytes
or when initialSizeInBytes or
maxSizeInBytes is less than
zero.OutOfMemoryError - when there is insufficient memory for
the VTMemory object or for
the backing memory.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.initialSizeInBytes - The size in bytes of the memory to initially
allocate for this area.maxSizeInBytes - The maximum size in bytes to which this memory
area's size may grow.public VTMemory(long initialSizeInBytes,
long maxSizeInBytes,
Runnable logic)
VTMemory with the given parameters.
In JamaicaVM, the size of an VTMemory is not increased dynamically.
If the initial size is less than maxSizeInBytes, it will be set to
maxSizeInBytes.
IllegalArgumentException - when initialSizeInBytes is
greater than maxSizeInBytes,
or when initialSizeInBytes or
maxSizeInBytes is less than
zero.OutOfMemoryError - when there is insufficient memory for
the VTMemory object or for
the backing memory.IllegalAssignmentError - when storing logic in this would violate the assignment
rules.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.initialSizeInBytes - The size in bytes of the memory to initially
allocate for this area.maxSizeInBytes - The maximum size in bytes to which this memory
area's size may grow.logic - An instance of Runnable whose run() method will use this as its
initial memory area. When logic is
null, this constructor is equivalent to
VTMemory(long initial, long maximum).public VTMemory(SizeEstimator initial, SizeEstimator maximum)
VTMemory(long, long, Runnable) with the argument
list (initial.getEstimate(), maximum.getEstimate(), null).
In JamaicaVM, the size of an VTMemory is not increased dynamically.
If the initial size is less than maximum, it will be set to
maximum.
IllegalArgumentException - when initial is null,
maximum is null,
initial.getEstimate() is
greater than maximum.getEstimate(),
or when initial.getEstimate()
is less than zero.OutOfMemoryError - when there is insufficient memory for
the VTMemory object or for
the backing memory.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.initial - The size in bytes of the memory to initially allocate for
this area estimated by an instance of SizeEstimator.maximum - The maximum size in bytes to which this memory area's size
may grow estimated by an instance of SizeEstimator.public VTMemory(SizeEstimator initial, SizeEstimator maximum, Runnable logic)
VTMemory(long, long, Runnable) with the argument
list (initial.getEstimate(), maximum.getEstimate(), logic).
In JamaicaVM, the size of an VTMemory is not increased
dynamically. If the initial size is less than maximum, it
will be set to maximum.
IllegalArgumentException - when initial is null,
maximum is null,
initial.getEstimate() is
greater than maximum.getEstimate(),
or when initial.getEstimate()
is less than zero.OutOfMemoryError - when there is insufficient memory for
the VTMemory object or for
the backing memory.IllegalAssignmentError - when storing logic in this would violate the assignment
rules.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.initial - The size in bytes of the memory to initially allocate for
this area estimated by an instance of SizeEstimator.maximum - The maximum size in bytes to which this memory area's size
may grow estimated by an instance of SizeEstimator.logic - An instance of Runnable whose run() method
will use this as its initial memory area. When
logic is null, this constructor is
equivalent to VTMemory(SizeEstimator initial,
SizeEstimator maximum).public VTMemory(long size)
VTMemory(long, long, Runnable) with the argument
list (size, size, null).IllegalArgumentException - when size is less than zero.OutOfMemoryError - when there is insufficient memory for
the VTMemory object or for
the backing memory.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.size - The size in bytes of the memory to allocate for this area. This
memory must be committed before the completion of the
constructor.public VTMemory(long size,
Runnable logic)
VTMemory(long, long, Runnable) with the argument
list (size, size, logic).IllegalArgumentException - when size is less than zero.OutOfMemoryError - when there is insufficient memory for the
VTMemory object or for the backing
memory.IllegalAssignmentError - when storing logic in this
would violate the assignment rules.size - The size in bytes of the memory to allocate for this area.
This memory must be committed before the completion of the
constructor.logic - The run() of the given Runnable will be
executed using this as its initial memory area. When
logic is null, this constructor is equivalent
to VTMemory(long size).public VTMemory(SizeEstimator size)
VTMemory(long, long, Runnable) with the argument
list (size, size, null).IllegalArgumentException - when size is less than zero.OutOfMemoryError - when there is insufficient memory for
the VTMemory object or for
the backing memory.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.size - The size in bytes of the memory to allocate for this area. This
memory must be committed before the completion of the
constructor.public VTMemory(SizeEstimator size, Runnable logic)
VTMemory(long, long, Runnable) with the argument
list (size.getEstimate(), size.getEstimate(), logic).IllegalArgumentException - when size is null, or
size.getEstimate() is less
than zero.OutOfMemoryError - when there is insufficient memory for
the VTMemory object or for
the backing memory.IllegalAssignmentError - when storing logic in this would violate the assignment
rules.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.size - An instance of SizeEstimator used to give an estimate
of the initial size. This memory must be committed before the
completion of the constructor.logic - The run() of the given Runnable will be
executed using this as its initial memory area. When
logic is null, this constructor is equivalent
to VTMemory(SizeEstimator size).public String toString()
(VTMemory) ScopedMemory#<num>
where <num> uniquely identifies the VTMemory area.toString in class ScopedMemoryaicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.