aicas logoJamaica 6.4 release 1

javax.realtime
Class PhysicalMemoryManager

java.lang.Object
  extended by javax.realtime.PhysicalMemoryManager

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.


Field Summary
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 Summary
PhysicalMemoryManager()
           
 
Method Summary
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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DMA

public static final Object DMA
Memory type for direct memory access memory, if supported by the implementation.

In JamaicaVM, DMA memory is currently not supported.


SHARED

public static final Object SHARED
Memory type for shared memory, if supported by the implementation.

In JamaicaVM, shared memory is currently not supported.


ALIGNED

public static final Object ALIGNED
Memory type for aligned memory, if supported by the implementation.

In JamaicaVM, aligned memory is currently not supported.


BYTESWAP

public static final Object BYTESWAP
Memory type for automatic byte swapping memory, if supported by the implementation.

In JamaicaVM, byte swap memory is currently not supported.


IO_PAGE

public static final Object IO_PAGE
Memory type for I/O memory, if supported by the implementation.

In JamaicaVM, I/O memory is currently supported only for Linux on x86 architectures.

Constructor Detail

PhysicalMemoryManager

public PhysicalMemoryManager()
Method Detail

registerFilter

public static final void registerFilter(Object type,
                                        PhysicalMemoryTypeFilter filter)
                                 throws DuplicateFilterException,
                                        ResourceLimitError,
                                        IllegalArgumentException,
                                        SecurityException
registerFilter registers a type filter with the physical memory manager.

Parameters:
type - the type of memory handled by this filter.
filter - the filter for this type.
Throws:
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

removeFilter

public static final void removeFilter(Object type)
removeFilter removes the filter with the given type

Parameters:
type - the type of memory handled by the filter that is to be removed.
Throws:
IllegalArgumentException - if type is null.
SecurityException - if adding new filters is not permitted (RealtimeSystem.getSecurityManager().checkSetFilter() causes this exception).

isRemovable

public static boolean isRemovable(long base,
                                  long size)
isRemovable is true if the memory at the given range is removable.

Parameters:
base - the base address of the range.
size - the size of the range.
Returns:
true iff the memory at that base is removable.
Throws:
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.

isRemoved

public static boolean isRemoved(long base,
                                long size)
isRemoved returns true iff the given memory range is currently removed.

Parameters:
base - the base address of the range.
size - the size of the range.
Returns:
true iff the memory at that base is removed
Throws:
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.

onRemoval

public static void onRemoval(long base,
                             long size,
                             AsyncEvent ae)
onRemoval associates the given AsyncEvent with the removal event of the specified memory range.

Parameters:
base - the base address of the range.
size - the size of the range.
ae - the AsyncEvent to be fired on a removal event.
Throws:
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.
Since:
RTSJ V1.0.1

onRemoval

public static void onRemoval(long base,
                             long size,
                             AsyncEventHandler aeh)
Deprecated. RTSJ V1.0.1 Use onRemoval(long, long, AsyncEvent) instead.

onRemoval associates the given AsyncEventHandler with the removal event of the specified memory range.

Parameters:
base - the base address of the range.
size - the size of the range.
aeh - the AsyncEventHandler to be fired on a removal event.
Throws:
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.

onInsertion

public static void onInsertion(long base,
                               long size,
                               AsyncEvent ae)
onInsertion associates the given AsyncEvent with the insertion event of the specified memory range.

Parameters:
base - the base address of the range.
size - the size of the range.
ae - the AsyncEvent to be fired on an insertion event.
Throws:
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.
Since:
RTSJ V1.0.1

onInsertion

public static void onInsertion(long base,
                               long size,
                               AsyncEventHandler aeh)
Deprecated. RTSJ V1.0.1 Use onInsertion(long, long, AsyncEvent) instead.

onInsertion associates the given AsyncEventHandler with the insertion event of the specified memory range.

Parameters:
base - the base address of the range.
size - the size of the range.
aeh - the AsyncEventHandler to be fired on an insertion event.
Throws:
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.

unregisterInsertionEvent

public static boolean unregisterInsertionEvent(long base,
                                               long size,
                                               AsyncEvent ae)
unregisterInsertionEvent removes the association events added by onInsertion(long, long, AsyncEvent).

Parameters:
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.
Throws:
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.
Since:
RTSJ V1.0.1

unregisterRemovalEvent

public static boolean unregisterRemovalEvent(long base,
                                             long size,
                                             AsyncEvent ae)
unregisterRemovalEvent removes the association events added by onRemoval(long, long, AsyncEvent).

Parameters:
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.
Throws:
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.
Since:
RTSJ V1.0.1

aicas logoJamaica 6.4 release 1

aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2015 aicas GmbH. All Rights Reserved.