public class LTMemory extends ScopedMemory
LTMemory.
In JamaicaVM, the memory space for this LTMemory area is allocated from the
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 an LTMemory may fail if the available
memory on the Java heap is low.
| Constructor and Description |
|---|
LTMemory(long sizeInBytes)
Equivalent to
LTMemory(long, long, Runnable) with the argument
list (sizeInBytes, sizeInBytes, null). |
LTMemory(long initialSizeInBytes,
long maxSizeInBytes)
Equivalent to
LTMemory(long, long, Runnable) with the argument
list (initialSizeInBytes, maxSizeInBytes, null). |
LTMemory(long initialSizeInBytes,
long maxSizeInBytes,
java.lang.Runnable logic)
Creates an
LTMemory of the given size. |
LTMemory(long sizeInBytes,
java.lang.Runnable logic)
Equivalent to
LTMemory(long, long, Runnable) with the argument
list (sizeInBytes, sizeInBytes, logic). |
LTMemory(SizeEstimator size)
Equivalent to
LTMemory(long, long, Runnable) with the argument
list (size.getEstimate(), size.getEstimate(), null). |
LTMemory(SizeEstimator size,
java.lang.Runnable logic)
Equivalent to
LTMemory(long, long, Runnable) with the argument
list (size.getEstimate(), size.getEstimate(), logic). |
LTMemory(SizeEstimator initial,
SizeEstimator maximum)
Equivalent to
LTMemory(long, long, Runnable) with the argument
list (initial.getEstimate(), maximum.getEstimate(), null). |
LTMemory(SizeEstimator initial,
SizeEstimator maximum,
java.lang.Runnable logic)
Equivalent to
LTMemory(long, long, Runnable) with the argument
list (initial.getEstimate(), maximum.getEstimate(), logic). |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toString()
Creates a string representation of this object.
|
enter, enter, executeInArea, executeInArea, executeInArea, executeInArea, executeInArea, executeInArea, getMaximumSize, getPortal, getReferenceCount, join, join, joinAndEnter, joinAndEnter, joinAndEnter, joinAndEnter, mayHoldReferenceTo, mayHoldReferenceTo, memoryConsumed, memoryRemaining, newArray, newInstance, newInstance, setPortal, sizeenter, enter, enter, enter, enter, getMemoryArea, newArrayInAreapublic LTMemory(long initialSizeInBytes,
long maxSizeInBytes)
LTMemory(long, long, Runnable) with the argument
list (initialSizeInBytes, maxSizeInBytes, null).
In JamaicaVM, the size of an LTMemory is not increased dynamically. If the initial size is less than maxSizeInBytes, it will be set to maxSizeInBytes.
initialSizeInBytes - The size in bytes of the memory to allocate for
this area. This memory must be committed before
the completion of the constructor.maxSizeInBytes - The size in bytes of the memory to allocate for
this area.java.lang.IllegalArgumentException - when initialSizeInBytes is
greater than maxSizeInBytes,
or when initial or maxSizeInBytes is less than zero.java.lang.OutOfMemoryError - when there is insufficient memory for
the LTMemory object or for
the backing memory.java.lang.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.public LTMemory(long initialSizeInBytes,
long maxSizeInBytes,
java.lang.Runnable logic)
LTMemory of the given size.
In JamaicaVM, the size of an LTMemory is not increased dynamically.
If the initial size is less than maxSizeInBytes, it will be set to
maxSizeInBytes.
initialSizeInBytes - The size in bytes of the memory to allocate for
this area. This memory must be committed before
the completion of the constructor.maxSizeInBytes - The size in bytes of the memory to allocate for
this area.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
LTMemory(long initial, long maximum).java.lang.IllegalArgumentException - when initialSizeInBytes is
greater than maxSizeInBytes,
or when initialSizeInBytes or
maxSizeInBytes is less than
zero.java.lang.OutOfMemoryError - when there is insufficient memory for
the LTMemory object or for
the backing memory.IllegalAssignmentError - when storing logic in this would violate the assignment
rules.java.lang.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.public LTMemory(SizeEstimator initial, SizeEstimator maximum)
LTMemory(long, long, Runnable) with the argument
list (initial.getEstimate(), maximum.getEstimate(), null).
In JamaicaVM, the size of an LTMemory is not increased dynamically.
If the initial size is less than maxSizeInBytes, it will be set to
maxSizeInBytes.
initial - An instance of SizeEstimator used to give an
estimate of the initial size. This memory must be committed
before the completion of the constructor.maximum - An instance of SizeEstimator used to give an
estimate for the maximum bytes to allocate for this area.java.lang.IllegalArgumentException - when initial is null,
maximum is null,
initial.getEstimate() is
greater than maximum.getEstimate(),
or when initial.getEstimate()
is less than zero.java.lang.OutOfMemoryError - when there is insufficient memory for
the LTMemory object or for
the backing memory.java.lang.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.public LTMemory(SizeEstimator initial, SizeEstimator maximum, java.lang.Runnable logic)
LTMemory(long, long, Runnable) with the argument
list (initial.getEstimate(), maximum.getEstimate(), logic).
In JamaicaVM, the size of an LTMemory is not increased dynamically. If the initial size is less than maxSizeInBytes, it will be set to maxSizeInBytes.
initial - An instance of SizeEstimator used to give an
estimate of the initial size. This memory must be committed
before the completion of the constructor.maximum - An instance of SizeEstimator used to give an
estimate for the maximum bytes to allocate for this area.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 LTMemory(SizeEstimator initial,
SizeEstimator maximum).java.lang.IllegalArgumentException - when initial is null,
maximum is null,
initial.getEstimate() is
greater than maximum.getEstimate(),
or when initial.getEstimate()
is less than zero.java.lang.OutOfMemoryError - when there is insufficient memory for
the LTMemory object or for
the backing memory.IllegalAssignmentError - when storing logic in this would violate the assignment
rules.java.lang.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.public LTMemory(long sizeInBytes)
LTMemory(long, long, Runnable) with the argument
list (sizeInBytes, sizeInBytes, null).sizeInBytes - The size in bytes of the memory to allocate for this
area. This memory must be committed before the
completion of the constructor.java.lang.IllegalArgumentException - when sizeInBytes is less than
zero.java.lang.OutOfMemoryError - when there is insufficient memory for
the LTMemory object or for
the backing memory.java.lang.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.public LTMemory(long sizeInBytes,
java.lang.Runnable logic)
LTMemory(long, long, Runnable) with the argument
list (sizeInBytes, sizeInBytes, logic).sizeInBytes - 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 LTMemory(long sizeInBytes).java.lang.IllegalArgumentException - when sizeInBytes is less than
zero.java.lang.OutOfMemoryError - when there is insufficient memory for
the LTMemory object or for
the backing memory.IllegalAssignmentError - when storing logic in this would violate the assignment
rules.java.lang.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.public LTMemory(SizeEstimator size)
LTMemory(long, long, Runnable) with the argument
list (size.getEstimate(), size.getEstimate(), null).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.java.lang.IllegalArgumentException - when size is null, or
size.getEstimate() is less
than zero.java.lang.OutOfMemoryError - when there is insufficient memory for
the LTMemory object or for
the backing memory.java.lang.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.public LTMemory(SizeEstimator size, java.lang.Runnable logic)
LTMemory(long, long, Runnable) with the argument
list (size.getEstimate(), size.getEstimate(), logic).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 LTMemory(SizeEstimator size).java.lang.IllegalArgumentException - when size is null, or
size.getEstimate() is less
than zero.java.lang.OutOfMemoryError - when there is insufficient memory for
the LTMemory object or for
the backing memory.IllegalAssignmentError - when storing logic in this would violate the assignment
rules.java.lang.UnsupportedOperationException - In JamaicaVM when a user-defined
subclass does not know about the
memory area implementation details.public java.lang.String toString()
(LTMemory) ScopedMemory#<num> where <num>
uniquely identifies the LTMemory area.toString in class ScopedMemorythis.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2021 aicas GmbH. All Rights Reserved.