|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.realtime.PhysicalMemoryManager
The PhysicalMemoryManager
is available for use by the various physical
memory accessor objects (VTPhysicalMemory
, LTPhysicalMemory
,
ImmortalPhysicalMemory
, RawMemoryAccess
, and
RawMemoryFloatAccess
)
to create objects of the correct type that
are bound to areas of physical memory with the appropriate
characteristics -- or with appropriate accessor behavior. Examples of
characteristics that might be specified are: DMA memory, accessors
with byte swapping, etc.
The base implementation will provide a PhysicalMemoryManager
and
a set of
PhysicalMemoryTypeFilter
classes that correctly identify memory classes that
are standard for the (OS, JVM, and processor) platform.
OEMs may provide PhysicalMemoryTypeFilter
classes
that allow additional characteristics of memory devices
to be specified.
Memory attributes that are configured may not be compatible with one another.
For instance, copy-back cache enable may be incompatible with execute-only. In this
case, the implementation of memory filters may detect conflicts and throw a
MemoryTypeConflictException
, but since filters are not part of the normative
RTSJ, this exception is at best advisory.
Field Summary | |
static java.lang.String |
ALIGNED
Specify this to identify aligned memory. |
static java.lang.String |
BYTESWAP
Specify this if byte swapping should be used. |
static java.lang.String |
DMA
Specify this to identify DMA memory. |
static java.lang.String |
SHARED
Specify this to identify shared memory. |
Method Summary | |
static boolean |
isRemovable(long address,
long size)
Is the specified range of memory removable? |
static boolean |
isRemoved(long address,
long size)
Is any part of the specified range of memory presently removed? This method is used for devices that lie in the memory address space and can be removed while the system is running. |
static void |
onInsertion(long base,
long size,
AsyncEventHandler aeh)
Register the specified AsyncEventHandler to run when any memory in the range is
added to the system. |
static void |
onRemoval(long base,
long size,
AsyncEventHandler aeh)
Register the specified AEH to run when any memory in the range is removed from the system. |
static void |
registerFilter(java.lang.Object name,
PhysicalMemoryTypeFilter filter)
Register a memory type filter with the physical memory manager. |
static void |
removeFilter(java.lang.Object name)
Remove the identified filter from the set of registered filters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DMA
public static final java.lang.String SHARED
public static final java.lang.String ALIGNED
public static final java.lang.String BYTESWAP
Method Detail |
public static final void registerFilter(java.lang.Object name, PhysicalMemoryTypeFilter filter) throws DuplicateFilterException, java.lang.IllegalArgumentException
name
- The type of memory handled by this filterfilter
- The filter objectDuplicateFilterException
- A filter for this type of memory
already existsjava.lang.RuntimeException
- The system is configured for a bounded
number of filters. This filter exceeds the bound.java.lang.IllegalArgumentException
- The name parameter must not be an array
of objects.java.lang.IllegalArgumentException
- The name and filter must both be in
immortal memory.public static final void removeFilter(java.lang.Object name)
name
- The identifying object for this memory attribute.public static boolean isRemovable(long address, long size)
address
- The starting address in physical memorysize
- The size of the memory areapublic static boolean isRemoved(long address, long size)
address
- The starting address in physical memorysize
- The size of the memory areapublic static void onRemoval(long base, long size, AsyncEventHandler aeh)
base
- The starting address in physical memorysize
- The size of the memory areaaeh
- Register this aeh.java.lang.IllegalArgumentException
- if the specified
range contains no removable memory.public static void onInsertion(long base, long size, AsyncEventHandler aeh)
AsyncEventHandler
to run when any memory in the range is
added to the system.
If the specified range of physical memory contains multiple different
types of removable memory, the AEH will be registered with any one of them.
If the size or the base is less than 0, unregister all "remove" references to the AEH.base
- The starting address in physical memorysize
- The size of the memory areaaeh
- Register this AEH.java.lang.IllegalArgumentException
- If the specified
range contains no removable memory.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |