public final class PhysicalMemoryManager extends Object
Jamaica Real-Time Specification for Java class PhysicalMemoryManager.
This class is mainly a helper class for classes that enable the access to physical memory (classes ImmortalPhysicalMemory, LTPhysicalMemory, VTPhysicalMemory, RawMemoryAccess and RawMemoryFloatAccess). PhysicalMemoryManager finds areas of physical memory with requested characteristics.
Modifier and Type | Field and Description |
---|---|
static Object |
ALIGNED
Memory type for aligned memory, if supported by the
implementation.
|
static Object |
BYTESWAP
Memory type for automatic byte swapping memory, if supported by
the implementation.
|
static Object |
DMA
Memory type for direct memory access memory, if supported by the
implementation.
|
static Object |
IO_PAGE
Memory type for I/O memory, if supported by the implementation.
|
static Object |
SHARED
Memory type for shared memory, if supported by the
implementation.
|
Constructor and Description |
---|
PhysicalMemoryManager() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isRemovable(long base,
long size)
isRemovable is true if the memory at the given range is
removable.
|
static boolean |
isRemoved(long base,
long size)
isRemoved returns true iff the given memory range is currently
removed.
|
static void |
onInsertion(long base,
long size,
AsyncEvent ae)
onInsertion associates the given AsyncEvent with the insertion
event of the specified memory range.
|
static void |
onInsertion(long base,
long size,
AsyncEventHandler aeh)
Deprecated.
RTSJ V1.0.1 Use onInsertion(long, long, AsyncEvent)
instead.
|
static void |
onRemoval(long base,
long size,
AsyncEvent ae)
onRemoval associates the given AsyncEvent with the removal event
of the specified memory range.
|
static void |
onRemoval(long base,
long size,
AsyncEventHandler aeh)
Deprecated.
RTSJ V1.0.1 Use onRemoval(long, long, AsyncEvent)
instead.
|
static void |
registerFilter(Object type,
PhysicalMemoryTypeFilter filter)
registerFilter registers a type filter with the physical memory
manager.
|
static void |
removeFilter(Object type)
removeFilter removes the filter with the given type
|
static boolean |
unregisterInsertionEvent(long base,
long size,
AsyncEvent ae)
unregisterInsertionEvent removes the association events added by
onInsertion(long, long, AsyncEvent).
|
static boolean |
unregisterRemovalEvent(long base,
long size,
AsyncEvent ae)
unregisterRemovalEvent removes the association events added by
onRemoval(long, long, AsyncEvent).
|
public static final Object DMA
In JamaicaVM, DMA memory is currently not supported.
public static final Object SHARED
In JamaicaVM, shared memory is currently not supported.
public static final Object ALIGNED
In JamaicaVM, aligned memory is currently not supported.
public static final Object BYTESWAP
In JamaicaVM, byte swap memory is currently not supported.
public static final Object IO_PAGE
In JamaicaVM, I/O memory is currently supported only for Linux on x86 architectures.
public static final void registerFilter(Object type, PhysicalMemoryTypeFilter filter) throws DuplicateFilterException, ResourceLimitError, IllegalArgumentException, SecurityException
DuplicateFilterException
- if a filter for the given type
already exists.ResourceLimitError
- Thrown if the system does only
support a bounded number of filters and this filter exceeds the
bound.SecurityException
- if adding new filters is not permitted
(RealtimeSystem.getSecurityManager().checkSetFilter() causes this
exception).IllegalArgumentException
type
- the type of memory handled by this filter.filter
- the filter for this type.public static final void removeFilter(Object type)
IllegalArgumentException
- if type is null.SecurityException
- if adding new filters is not permitted
(RealtimeSystem.getSecurityManager().checkSetFilter() causes this
exception).type
- the type of memory handled by the filter that is to
be removed.public static boolean isRemovable(long base, long size)
IllegalArgumentException
- iff size is negative.SizeOutOfBoundsException
- iff base plus size is greater
than the physical memory range of the processor.OffsetOutOfBoundsException
- iff base is negative.base
- the base address of the range.size
- the size of the range.public static boolean isRemoved(long base, long size)
IllegalArgumentException
- iff size is negative.SizeOutOfBoundsException
- iff base plus size is greater
than the physical memory range of the processor.OffsetOutOfBoundsException
- iff base is negative.base
- the base address of the range.size
- the size of the range.public static void onRemoval(long base, long size, AsyncEvent ae)
IllegalArgumentException
- iff size is negative or
specified memory range is not removable.SizeOutOfBoundsException
- iff base plus size is greater
than physical memory range of the processor.OffsetOutOfBoundsException
- iff base is negative.base
- the base address of the range.size
- the size of the range.ae
- the AsyncEvent to be fired on a removal event.public static void onRemoval(long base, long size, AsyncEventHandler aeh)
IllegalArgumentException
- iff size is negative or
specified memory range is not removable or aeh is null.SizeOutOfBoundsException
- iff base plus size is greater
than the physical memory range of the processor.OffsetOutOfBoundsException
- iff base is negative.base
- the base address of the range.size
- the size of the range.aeh
- the AsyncEventHandler to be fired on a removal
event.public static void onInsertion(long base, long size, AsyncEvent ae)
IllegalArgumentException
- iff size is negative or
specified memory range is not removable.SizeOutOfBoundsException
- iff base plus size is greater
than the physical memory range of the processor.OffsetOutOfBoundsException
- iff base is negative.base
- the base address of the range.size
- the size of the range.ae
- the AsyncEvent to be fired on an insertion event.public static void onInsertion(long base, long size, AsyncEventHandler aeh)
IllegalArgumentException
- iff size is negative or
specified memory range is not removable or aeh is null.SizeOutOfBoundsException
- iff base plus size is greater
than the physical memory range of the processor.OffsetOutOfBoundsException
- iff base is negative.base
- the base address of the range.size
- the size of the range.aeh
- the AsyncEventHandler to be fired on an insertion event.public static boolean unregisterInsertionEvent(long base, long size, AsyncEvent ae)
IllegalArgumentException
- iff size is negative.SizeOutOfBoundsException
- iff base plus size is greater
than the physical memory range of the processor.OffsetOutOfBoundsException
- iff base is negative.base
- the base address of the range.size
- the size of the range.ae
- the AsyncEvent to be fired on an insertion event. May
be null to remove all AsyncEvents registered for the given
range.public static boolean unregisterRemovalEvent(long base, long size, AsyncEvent ae)
IllegalArgumentException
- iff size is negative.SizeOutOfBoundsException
- iff base plus size is greater
than the physical memory range of the processor.OffsetOutOfBoundsException
- iff base is negative.base
- the base address of the range.size
- the size of the range.ae
- the AsyncEvent to be fired on an insertion event. May
be null to remove all AsyncEvents registered for the given
range.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.