java.lang.Object javax.realtime.MemoryArea javax.realtime.ScopedMemory javax.realtime.VTPhysicalMemory
public class VTPhysicalMemory
An instance of 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
.
MemoryArea
,
ScopedMemory
,
VTMemory
,
LTMemory
,
LTPhysicalMemory
,
ImmortalPhysicalMemory
,
RealtimeThread
,
NoHeapRealtimeThread
Constructor Summary | |
---|---|
VTPhysicalMemory(java.lang.Object type,
long size)
Create an instance of VTPhysicalMemory with the given parameters. |
|
VTPhysicalMemory(java.lang.Object type,
long base,
long size)
Create an instance of VTPhysicalMemory with the given parameters. |
|
VTPhysicalMemory(java.lang.Object type,
long base,
long size,
java.lang.Runnable logic)
Create an instance of VTPhysicalMemory with the given parameters. |
|
VTPhysicalMemory(java.lang.Object type,
long size,
java.lang.Runnable logic)
Create an instance of VTPhysicalMemory with the given parameters. |
|
VTPhysicalMemory(java.lang.Object type,
long base,
SizeEstimator size)
Create an instance of VTPhysicalMemory with the given parameters. |
|
VTPhysicalMemory(java.lang.Object type,
long base,
SizeEstimator size,
java.lang.Runnable logic)
Create an instance of VTPhysicalMemory with the given parameters. |
|
VTPhysicalMemory(java.lang.Object type,
SizeEstimator size)
Create an instance of VTPhysicalMemory with the given parameters. |
|
VTPhysicalMemory(java.lang.Object type,
SizeEstimator size,
java.lang.Runnable logic)
Create an instance of VTPhysicalMemory with the given parameters. |
Method Summary | |
---|---|
java.lang.String |
toString()
Creates a string representing this object. |
Methods inherited from class javax.realtime.ScopedMemory |
---|
enter, enter, executeInArea, getMaximumSize, getPortal, getReferenceCount, join, join, joinAndEnter, joinAndEnter, joinAndEnter, joinAndEnter, newArray, newInstance, newInstance, setPortal |
Methods inherited from class javax.realtime.MemoryArea |
---|
getMemoryArea, memoryConsumed, memoryRemaining, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VTPhysicalMemory(java.lang.Object type, long size)
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. If the required memory has more than one
attribute, type
may be an array of objects. If 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.
java.lang.SecurityException
- Thrown if the application doesn't have
permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException
- Thrown if
the implementation detects that size
extends
beyond physically addressable memory.
UnsupportedPhysicalMemoryException
- Thrown if the underlying
hardware does not support the given type, or if no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.
MemoryTypeConflictException
- Thrown if the specified base does not point to
memory that matches the requested type, or if type
specifies
incompatible memory attributes.
java.lang.IllegalArgumentException
- Thrown if size
is less than zero.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, long base, long size)
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. If the required memory has more than one
attribute, type
may be an array of objects. If 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.
java.lang.SecurityException
- Thrown if the application doesn't have
permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException
- Thrown if
the implementation detects that size
extends
beyond physically addressable memory.
OffsetOutOfBoundsException
- Thrown if the base
address is invalid.
UnsupportedPhysicalMemoryException
- Thrown if the underlying
hardware does not support the given type, or if no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.
MemoryTypeConflictException
- Thrown if the specified base does not point to
memory that matches the requested type, or if type
specifies
incompatible memory attributes.
MemoryInUseException
- Thrown if the specified memory is already in use.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, SizeEstimator size)
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. If the required memory has more than one
attribute, type
may be an array of objects. If 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.
java.lang.SecurityException
- Thrown if the application doesn't have
permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException
- Thrown if
the implementation detects that the size
estimate from size
extends
beyond physically addressable memory.
UnsupportedPhysicalMemoryException
- Thrown if the underlying
hardware does not support the given type, or if no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.
MemoryTypeConflictException
- Thrown if the specified base does not point to
memory that matches the requested type, or if type
specifies
incompatible memory attributes.
java.lang.IllegalArgumentException
- Thrown if size
is null,
or size.getEstimate()
is negative.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, long base, SizeEstimator size)
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. If the required memory has more than one
attribute, type
may be an array of objects. If 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.
java.lang.SecurityException
- Thrown if the application doesn't have
permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException
- Thrown if
the implementation detects that the size
estimate from size
extends
beyond physically addressable memory.
OffsetOutOfBoundsException
- Thrown if the base
address is invalid.
UnsupportedPhysicalMemoryException
- Thrown if the underlying
hardware does not support the given type, or if no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.
MemoryTypeConflictException
- Thrown if the specified base does not point to
memory that matches the requested type, or if type
specifies
incompatible memory attributes.
MemoryInUseException
- Thrown if the specified memory is already in use.
java.lang.IllegalArgumentException
- Thrown if size
is null,
or size.getEstimate()
is negative.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, 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. If the required memory has more than one
attribute, type
may be an array of objects. If 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. If logic
is null,
logic
must be supplied when the memory area is entered.
java.lang.SecurityException
- Thrown if the application doesn't have
permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException
- Thrown if
the implementation detects that size
extends
beyond physically addressable memory.
UnsupportedPhysicalMemoryException
- Thrown if the underlying
hardware does not support the given type, or if no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.
MemoryTypeConflictException
- Thrown if the specified base does not point to
memory that matches the requested type, or if type
specifies
incompatible memory attributes.
IllegalAssignmentError
- Thrown if storing logic
in this
would
violate the assignment rules.PhysicalMemoryManager
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. If the required memory has more than one
attribute, type
may be an array of objects. If 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. If logic
is null,
logic
must be supplied when the memory area is entered.
SizeOutOfBoundsException
- Thrown if
the implementation detects that size
extends
beyond physically addressable memory.
java.lang.SecurityException
- Thrown if the application doesn't have
permissions to access physical memory or the given range of memory.
OffsetOutOfBoundsException
- Thrown if the base
address is invalid.
UnsupportedPhysicalMemoryException
- Thrown if the underlying
hardware does not support the given type, or if no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.
MemoryTypeConflictException
- Thrown if the specified base does not point to
memory that matches the requested type, or if type
specifies
incompatible memory attributes.
MemoryInUseException
- Thrown if the specified memory is already in use.
IllegalAssignmentError
- Thrown if storing logic
in this
would
violate the assignment rules.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type, SizeEstimator 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. If the required memory has more than one
attribute, type
may be an array of objects. If 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. If logic
is null,
logic
must be supplied when the memory area is entered.
java.lang.SecurityException
- Thrown if the application doesn't have
permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException
- Thrown if
the implementation detects that the size
estimate from size
extends
beyond physically addressable memory.
UnsupportedPhysicalMemoryException
- Thrown if the underlying
hardware does not support the given type, or if no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.
MemoryTypeConflictException
- Thrown if the specified base does not point to
memory that matches the requested type, or if type
specifies
incompatible memory attributes.
java.lang.IllegalArgumentException
- Thrown if size
is null,
or size.getEstimate()
is negative.
IllegalAssignmentError
- Thrown if 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
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. If the required memory has more than one
attribute, type
may be an array of objects. If 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. If logic
is null,
logic
must be supplied when the memory area is entered.
java.lang.SecurityException
- Thrown if the application doesn't have
permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException
- Thrown if
the implementation detects that the size
estimate from size
extends
beyond physically addressable memory.
OffsetOutOfBoundsException
- Thrown if the base
address is invalid.
UnsupportedPhysicalMemoryException
- Thrown if the underlying
hardware does not support the given type, or if no matching
PhysicalMemoryTypeFilter
has been registered with
the PhysicalMemoryManager
.
MemoryTypeConflictException
- Thrown if the specified base does not point to
memory that matches the requested type, or if type
specifies
incompatible memory attributes.
MemoryInUseException
- Thrown if the specified memory is already in use.
java.lang.IllegalArgumentException
- Thrown if size
is null,
or size.getEstimate()
is negative.
IllegalAssignmentError
- Thrown if storing logic
in this
would
violate the assignment rules.PhysicalMemoryManager
Method Detail |
---|
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
.