public final class PhysicalMemoryManager
extends java.lang.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 java.lang.Object |
ALIGNED
Memory type for aligned memory, if supported by the
implementation.
|
static java.lang.Object |
BYTESWAP
Memory type for automatic byte swapping memory, if supported by
the implementation.
|
static java.lang.Object |
DMA
Memory type for direct memory access memory, if supported by the
implementation.
|
static java.lang.Object |
IO_PAGE
Memory type for I/O memory, if supported by the implementation.
|
static java.lang.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(java.lang.Object type,
PhysicalMemoryTypeFilter filter)
registerFilter registers a type filter with the physical memory
manager.
|
static void |
removeFilter(java.lang.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 java.lang.Object DMA
In JamaicaVM, DMA memory is currently not supported.
public static final java.lang.Object SHARED
In JamaicaVM, shared memory is currently not supported.
public static final java.lang.Object ALIGNED
In JamaicaVM, aligned memory is currently not supported.
public static final java.lang.Object BYTESWAP
In JamaicaVM, byte swap memory is currently not supported.
public static final java.lang.Object IO_PAGE
In JamaicaVM, I/O memory is currently supported only for Linux on x86 architectures.
public static final void registerFilter(java.lang.Object type, PhysicalMemoryTypeFilter filter) throws DuplicateFilterException, ResourceLimitError, java.lang.IllegalArgumentException, java.lang.SecurityException
type
- the type of memory handled by this filter.filter
- the filter for this type.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.java.lang.SecurityException
- if adding new filters is not permitted
(RealtimeSystem.getSecurityManager().checkSetFilter() causes this
exception).java.lang.IllegalArgumentException
public static final void removeFilter(java.lang.Object type)
type
- the type of memory handled by the filter that is to
be removed.java.lang.IllegalArgumentException
- if type is null.java.lang.SecurityException
- if adding new filters is not permitted
(RealtimeSystem.getSecurityManager().checkSetFilter() causes this
exception).public static boolean isRemovable(long base, long size)
base
- the base address of the range.size
- the size of the range.java.lang.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.public static boolean isRemoved(long base, long size)
base
- the base address of the range.size
- the size of the range.java.lang.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.public static void onRemoval(long base, long size, AsyncEvent ae)
base
- the base address of the range.size
- the size of the range.ae
- the AsyncEvent to be fired on a removal event.java.lang.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.public static void onRemoval(long base, long size, AsyncEventHandler aeh)
base
- the base address of the range.size
- the size of the range.aeh
- the AsyncEventHandler to be fired on a removal
event.java.lang.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.public static void onInsertion(long base, long size, AsyncEvent ae)
base
- the base address of the range.size
- the size of the range.ae
- the AsyncEvent to be fired on an insertion event.java.lang.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.public static void onInsertion(long base, long size, AsyncEventHandler aeh)
base
- the base address of the range.size
- the size of the range.aeh
- the AsyncEventHandler to be fired on an insertion event.java.lang.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.public static boolean unregisterInsertionEvent(long base, long size, AsyncEvent ae)
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.java.lang.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.public static boolean unregisterRemovalEvent(long base, long size, AsyncEvent ae)
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.java.lang.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.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2022 aicas GmbH. All Rights Reserved.