@Deprecated public class VTPhysicalMemory extends ScopedMemory
VTPhysicalMemory
allows objects to be allocated from
a range of physical memory with particular attributes, determined by
their memory type. This memory area has the same semantics
as ScopedMemory
memory areas, and the same performance
restrictions as VTMemory
.
No provision is made for sharing object in VTPhysicalMemory
with
entities outside the JVM that creates them, and, while the memory backing an instance of
VTPhysicalMemory
could be shared by multiple JVMs, the class does not
support such sharing.
Methods from VTPhysicalMemory
should be overridden only by methods that
use super
.
Constructor and Description |
---|
VTPhysicalMemory(java.lang.Object type,
long size)
Deprecated.
Equivalent to
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, next, size, null) , where
next is the beginning of the next best fit in the physical
memory range. |
VTPhysicalMemory(java.lang.Object type,
long base,
long size)
Deprecated.
Equivalent to
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, base, size, null) . |
VTPhysicalMemory(java.lang.Object type,
long base,
long size,
java.lang.Runnable logic)
Deprecated.
Creates an instance of
VTPhysicalMemory with the given
parameters. |
VTPhysicalMemory(java.lang.Object type,
long size,
java.lang.Runnable logic)
Deprecated.
Equivalent to
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, next, size, logic) , where
next is the beginning of the next best fit in the physical
memory range. |
VTPhysicalMemory(java.lang.Object type,
long base,
SizeEstimator size)
Deprecated.
Equivalent to
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, base, size.getEstimate(), null) . |
VTPhysicalMemory(java.lang.Object type,
long base,
SizeEstimator size,
java.lang.Runnable logic)
Deprecated.
Equivalent to
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, base, size.getEstimate(), logic) . |
VTPhysicalMemory(java.lang.Object type,
SizeEstimator size)
Deprecated.
Equivalent to
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, next, size.getEstimate(), null) ,
where next is the beginning of the next best fit in the physical
memory range. |
VTPhysicalMemory(java.lang.Object type,
SizeEstimator size,
java.lang.Runnable logic)
Deprecated.
Equivalent to
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, next, size.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 VTPhysicalMemory(java.lang.Object type, long base, long size, java.lang.Runnable logic)
VTPhysicalMemory
with the given
parameters.type
- An instance of Object
representing the
type of memory required, e.g., dma, shared, used
to define the base address and control the mapping. When the
required memory has more than one attribute,
type
may be an array of objects. When
type
is null
or a reference to an
array with no entries, any type of memory is
acceptable. Note that type
values are compared
by reference (==), not by value (equals
).base
- The physical memory address of the area.size
- The size of the area in bytes.logic
- The run()
method of this object will be
called whenever MemoryArea.enter()
is called. When
logic
is null
, logic
must be supplied when the memory area is entered.SizeOutOfBoundsException
- when
the implementation detects that size
extends
beyond physically addressable memory.StaticSecurityException
- when the application does not have
permissions to access physical memory or the given range of
memory.OffsetOutOfBoundsException
- when the base
address is invalid.UnsupportedPhysicalMemoryException
- when the underlying
hardware does not support the given type, or when no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.MemoryTypeConflictException
- when the specified base does
not point to memory that matches the requested type, or when
type
specifies incompatible memory attributes.MemoryInUseException
- when the specified memory is already in use.IllegalAssignmentError
- when storing logic
in
this
would violate the assignment rules.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, long base, SizeEstimator size, java.lang.Runnable logic)
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, base, size.getEstimate(), logic)
.type
- An instance of Object
representing the
type of memory required, e.g., dma, shared, used
to define the base address and control the mapping. When the
required memory has more than one attribute,
type
may be an array of objects. When
type
is null
or a reference to an
array with no entries, any type of memory is
acceptable. Note that type
values are compared
by reference (==), not by value (equals
).base
- The physical memory address of the area.size
- A size estimator for this memory area.logic
- The run()
method of this object will be
called whenever MemoryArea.enter()
is called. When
logic
is null
, logic
must be supplied when the memory area is entered.StaticSecurityException
- when the application doesn't have
permissions to access physical memory or the given range of memory.SizeOutOfBoundsException
- when
the implementation detects that the size
estimate from size
extends
beyond physically addressable memory.OffsetOutOfBoundsException
- when the base
address is invalid.UnsupportedPhysicalMemoryException
- when the underlying
hardware does not support the given type, or when no
matching PhysicalMemoryTypeFilter
has been
registered with the PhysicalMemoryManager
.MemoryTypeConflictException
- when the specified base does
not point to memory that matches the requested type, or when
type
specifies incompatible memory attributes.MemoryInUseException
- when the specified memory is already in use.java.lang.IllegalArgumentException
- when size
is null
.IllegalAssignmentError
- when storing logic
in
this
would violate the assignment rules.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, long base, long size)
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, base, size, null)
.type
- An instance of Object
representing the
type of memory required, e.g., dma, shared, used
to define the base address and control the mapping. When the
required memory has more than one attribute,
type
may be an array of objects. When
type
is null
or a reference to an
array with no entries, any type of memory is
acceptable. Note that type
values are compared
by reference (==), not by value (equals
).base
- The physical memory address of the area.size
- The size of the area in bytes.StaticSecurityException
- when the application doesn't have
permissions to access physical memory or the given range of memory.SizeOutOfBoundsException
- when
the implementation detects that size
extends
beyond physically addressable memory.OffsetOutOfBoundsException
- when the base
address is invalid.UnsupportedPhysicalMemoryException
- when the underlying
hardware does not support the given type, or when no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.MemoryTypeConflictException
- when the specified base does
not point to memory that matches the requested type, or when
type
specifies incompatible memory attributes.MemoryInUseException
- when the specified memory is already in use.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, long base, SizeEstimator size)
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, base, size.getEstimate(), null)
.type
- An instance of Object
representing the
type of memory required, e.g., dma, shared, used
to define the base address and control the mapping. When the
required memory has more than one attribute,
type
may be an array of objects. When
type
is null
or a reference to an
array with no entries, any type of memory is
acceptable. Note that type
values are compared
by reference (==), not by value (equals
).base
- The physical memory address of the area.size
- A size estimator for this memory area.StaticSecurityException
- when the application doesn't have
permissions to access physical memory or the given range of
memory.SizeOutOfBoundsException
- when
the implementation detects that the size
estimate from size
extends
beyond physically addressable memory.OffsetOutOfBoundsException
- when the base
address is invalid.UnsupportedPhysicalMemoryException
- when the underlying
hardware does not support the given type, or when no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.MemoryTypeConflictException
- when the specified base does
not point to memory that matches the requested type, or when
type
specifies incompatible memory attributes.MemoryInUseException
- when the specified memory is already in use.java.lang.IllegalArgumentException
- when size
is null
.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, long size, java.lang.Runnable logic)
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, next, size, logic)
, where
next
is the beginning of the next best fit in the physical
memory range.type
- An instance of Object
representing the
type of memory required (e.g., dma, shared), used
to define the base address and control the mapping. When the
required memory has more than one attribute,
type
may be an array of objects. When
type
is null
or a reference to an
array with no entries, any type of memory is
acceptable. Note that type
values are compared
by reference (==), not by value (equals
).size
- The size of the area in bytes.logic
- The run()
method of this object will be
called whenever MemoryArea.enter()
is called. When
logic
is null
, logic
must be supplied when the memory area is entered.StaticSecurityException
- when the application does not have
permissions to access physical memory or the given range of
memory.SizeOutOfBoundsException
- when
the implementation detects that size
extends
beyond physically addressable memory.UnsupportedPhysicalMemoryException
- when the underlying
hardware does not support the given type, or when no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.MemoryTypeConflictException
- when the specified base does
not point to memory that matches the requested type, or when
type
specifies incompatible memory attributes.IllegalAssignmentError
- when storing logic
in this
would violate the assignment rules.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, SizeEstimator size, java.lang.Runnable logic)
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, next, size.getEstimate(), logic)
.
where next
is the beginning of the next best fit in the physical
memory range.type
- An instance of Object
representing the
type of memory required, e.g., dma, shared, used
to define the base address and control the mapping. When the
required memory has more than one attribute,
type
may be an array of objects. When
type
is null
or a reference to an
array with no entries, any type of memory is
acceptable. Note that type
values are compared
by reference (==), not by value (equals
).size
- A size estimator for this area.logic
- The run()
method of this object will be
called whenever MemoryArea.enter()
is called. When
logic
is null
, logic
must be supplied when the memory area is entered.StaticSecurityException
- when the application doesn't have
permissions to access physical memory or the given range of memory.SizeOutOfBoundsException
- when
the implementation detects that the size
estimate from size
extends
beyond physically addressable memory.UnsupportedPhysicalMemoryException
- when the underlying
hardware does not support the given type, or when no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.MemoryTypeConflictException
- when the specified base does
not point to memory that matches the requested type, or when
type
specifies incompatible memory attributes.java.lang.IllegalArgumentException
- when size
is null
.IllegalAssignmentError
- when storing logic
in this
would violate the assignment rules.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, long size)
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, next, size, null)
, where
next
is the beginning of the next best fit in the physical
memory range.type
- An instance of Object
representing the
type of memory required, e.g., dma, shared, used
to define the base address and control the mapping. When the
required memory has more than one attribute,
type
may be an array of objects. When
type
is null
or a reference to an
array with no entries, any type of memory is
acceptable. Note that type
values are compared
by reference (==), not by value (equals
).size
- The size of the area in bytes.StaticSecurityException
- when the application doesn't have
permissions to access physical memory or the given range of memory.SizeOutOfBoundsException
- when
the implementation detects that size
extends
beyond physically addressable memory.UnsupportedPhysicalMemoryException
- when the underlying
hardware does not support the given type, or when no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.MemoryTypeConflictException
- when the specified base does
not point to memory that matches the requested type, or when
type
specifies incompatible memory attributes.java.lang.IllegalArgumentException
- when size
is less than zero.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, SizeEstimator size)
VTPhysicalMemory(Object, long, long, Runnable)
with the argument list (type, next, size.getEstimate(), null)
,
where next
is the beginning of the next best fit in the physical
memory range.type
- An instance of Object
representing the
type of memory required, e.g., dma, shared, used
to define the base address and control the mapping. When the
required memory has more than one attribute,
type
may be an array of objects. When
type
is null
or a reference to an
array with no entries, any type of memory is
acceptable. Note that type
values are compared
by reference (==), not by value (equals
).size
- A size estimator for this area.StaticSecurityException
- when the application doesn't have
permissions to access physical memory or the given range of
memory.SizeOutOfBoundsException
- when
the implementation detects that the size
estimate from size
extends
beyond physically addressable memory.UnsupportedPhysicalMemoryException
- when the underlying
hardware does not support the given type, or when no
matching PhysicalMemoryTypeFilter
has been
registered with the PhysicalMemoryManager
.MemoryTypeConflictException
- when the specified base does
not point to memory that matches the requested type, or when
type
specifies incompatible memory attributes.java.lang.IllegalArgumentException
- when size
is null
.PhysicalMemoryManager
public java.lang.String toString()
(VTPhysicalMemory) Scoped memory # num
where num
is a number that uniquely
identifies this VTPhysicalMemory
memory area.toString
in class ScopedMemory
this
.