|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | 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, 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. Esxamples 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 a 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 imcompatible 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. |
Constructor Summary | |
PhysicalMemoryManager()
|
Method Summary | |
static boolean |
isRemovable(long address,
long size)
Queries the system about the removability of the specified range of memory. |
static boolean |
isRemoved(long address,
long size)
Queries the system about the removed state of the specified range of memory. |
static void |
onInsertion(long base,
long size,
javax.realtime.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,
javax.realtime.AsyncEventHandler aeh)
Register the specified AsyncEventHandler to run when any
memory in the range is removed from the system. |
static void |
registerFilter(java.lang.Object name,
javax.realtime.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 ALIGNED
public static final java.lang.String BYTESWAP
public static final java.lang.String DMA
public static final java.lang.String SHARED
Constructor Detail |
public PhysicalMemoryManager()
Method Detail |
public static boolean isRemovable(long address, long size)
size
- The size of the memory area.public static boolean isRemoved(long address, long size)
size
- The size of the memory area.
public static void onInsertion(long base, long size, javax.realtime.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 AsyncEventHandler
will be registered with any one of
them. If the size or the base is less than zero, unregister all "remove"
references to the handler.
base
- The starting address in physical memory.size
- The size of the memory area.aeh
- The handler to register.public static void onRemoval(long base, long size, javax.realtime.AsyncEventHandler aeh) throws java.lang.IllegalArgumentException
AsyncEventHandler
to run when any
memory in the range is removed from 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 zero, remove all "remove" references to the
handler parameter.
base
- The starting address in physical memory.size
- The size of the memory area.aeh
- The handler to register.
java.lang.IllegalArgumentException
public static final void registerFilter(java.lang.Object name, javax.realtime.PhysicalMemoryTypeFilter filter) throws DuplicateFilterException, java.lang.IllegalArgumentException
name
- The type of memory handled by this filter.filter
- The filter object
DuplicateFilterException
- A filter for this type of memory already exists.
java.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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |