@Deprecated 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
.
Constructor and Description |
---|
VTMemory(long size)
Deprecated.
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (size, size, null) . |
VTMemory(long initial,
long maximum)
Deprecated.
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (initial, maximum, null) . |
VTMemory(long initial,
long maximum,
java.lang.Runnable logic)
Deprecated.
Creates a
VTMemory with the given parameters. |
VTMemory(long size,
java.lang.Runnable logic)
Deprecated.
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (size, size, logic) . |
VTMemory(SizeEstimator size)
Deprecated.
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (size.getEstimate(), size.getEstimate(), null) . |
VTMemory(SizeEstimator size,
java.lang.Runnable logic)
Deprecated.
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (size.getEstimate(), size.getEstimate(), logic) . |
VTMemory(SizeEstimator initial,
SizeEstimator maximum)
Deprecated.
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (initial.getEstimate(), maximum.getEstimate(), null) . |
VTMemory(SizeEstimator initial,
SizeEstimator maximum,
java.lang.Runnable logic)
Deprecated.
Equivalent to
VTMemory(long, long, Runnable) with the argument
list (initial.getEstimate(), maximum.getEstimate(), logic) . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
Deprecated.
Creates a string representing this object.
|
enter, enter, executeInArea, getMaximumSize, getPortal, getReferenceCount, join, join, joinAndEnter, joinAndEnter, joinAndEnter, joinAndEnter, newArray, newInstance, newInstance, setPortal
enter, enter, enter, enter, enter, executeInArea, executeInArea, executeInArea, executeInArea, executeInArea, getMemoryArea, mayHoldReferenceTo, mayHoldReferenceTo, memoryConsumed, memoryRemaining, newArrayInArea, size
public VTMemory(long initial, long maximum, java.lang.Runnable logic)
VTMemory
with the given parameters.initial
- The size in bytes of the memory to initially
allocate for this area.maximum
- 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)
.java.lang.IllegalArgumentException
- when initial
is
greater than maximum
, or when
initial
or maximum
is less than
zero.StaticOutOfMemoryError
- when there is insufficient memory for the
VTMemory
object or for its allocation area in its
backing store.IllegalAssignmentError
- when storing logic
in this
would violate the assignment rules.public VTMemory(SizeEstimator initial, SizeEstimator maximum, java.lang.Runnable logic)
VTMemory(long, long, Runnable)
with the argument
list (initial.getEstimate(), maximum.getEstimate(), logic)
.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)
.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.StaticOutOfMemoryError
- when there is insufficient memory for the
VTMemory
object or for its allocation area in its
backing store.IllegalAssignmentError
- when storing logic
in this
would violate the assignment rules.public VTMemory(long initial, long maximum)
VTMemory(long, long, Runnable)
with the argument
list (initial, maximum, null)
.initial
- The size in bytes of the memory to initially
allocate for this area.maximum
- The maximum size in bytes to which this memory area's size
may grow.java.lang.IllegalArgumentException
- when initial
is greater than maximum
or when initial
or maximum
is less than zero.StaticOutOfMemoryError
- when there is insufficient memory for the
VTMemory
object or for its allocation area in its
backing store.public VTMemory(SizeEstimator initial, SizeEstimator maximum)
VTMemory(long, long, Runnable)
with the argument
list (initial.getEstimate(), maximum.getEstimate(), null)
.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
.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.StaticOutOfMemoryError
- when there is insufficient memory for the
VTMemory
object or for its allocation area in its
backing store.public VTMemory(long size, java.lang.Runnable logic)
VTMemory(long, long, Runnable)
with the argument
list (size, size, logic)
.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)
.java.lang.IllegalArgumentException
- when size
is less than zero.StaticOutOfMemoryError
- when there is insufficient memory for the
VTMemory
object or for its allocation area in its
backing store.IllegalAssignmentError
- when storing logic
in
this
would violate the assignment rules.public VTMemory(SizeEstimator size, java.lang.Runnable logic)
VTMemory(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 VTMemory(SizeEstimator size)
.java.lang.IllegalArgumentException
- when size
is
null
, or size.getEstimate()
is
less than zero.StaticOutOfMemoryError
- when there is insufficient memory for the
VTMemory
object or for its allocation area in its
backing store.IllegalAssignmentError
- when storing logic
in
this
would violate the assignment rules.public VTMemory(long size)
VTMemory(long, long, Runnable)
with the argument
list (size, size, null)
.size
- 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 size
is less than zero.StaticOutOfMemoryError
- when there is insufficient memory for the
VTMemory
object or for its allocation area in its
backing store.public VTMemory(SizeEstimator size)
VTMemory(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.StaticOutOfMemoryError
- when there is insufficient memory for the
VTMemory
object or for its allocation area in its
backing store.public java.lang.String toString()
(VTMemory) ScopedMemory#<num>
where <num>
uniquely identifies the VTMemory
area.toString
in class ScopedMemory
this
.