|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PhysicalMemoryTypeFilter
Implementation or device providers may include classes that implement
PhysicalMemoryTypeFilter
which allow additional characteristics of memory
in devices to be specified.
Implementations of PhysicalMemoryTypeFilter
are intended to be used by
the PhysicalMemoryManager
, not directly from application code.
Method Summary | |
---|---|
boolean |
contains(long base,
long size)
Queries the system about whether the specified range of memory contains any of this type. |
long |
find(long base,
long size)
Search for physical memory of the right type. |
int |
getVMAttributes()
Gets the virtual memory attributes of this . |
int |
getVMFlags()
Gets the virtual memory flags of this . |
void |
initialize(long base,
long vBase,
long size)
If configuration is required for memory to fit the attribute of this object, do the configuration here. |
boolean |
isPresent(long base,
long size)
Queries the system about the existence of the specified range of physical memory. |
boolean |
isRemovable()
Queries the system about the removability of this memory. |
void |
onInsertion(long base,
long size,
AsyncEvent ae)
Register the specified AsyncEvent to fire when any memory of this type
in the range is
added to the system. |
void |
onInsertion(long base,
long size,
AsyncEventHandler aeh)
Deprecated. 1.0.1 Replace with onInsertion(long, long, AsyncEvent) |
void |
onRemoval(long base,
long size,
AsyncEvent ae)
Register the specified AE to fire when any memory in the range is removed from the system. |
void |
onRemoval(long base,
long size,
AsyncEventHandler aeh)
Deprecated. 1.0.1 |
boolean |
unregisterInsertionEvent(long base,
long size,
AsyncEvent ae)
Unregister the specified insertion event. |
boolean |
unregisterRemovalEvent(long base,
long size,
AsyncEvent ae)
Unregister the specified removal event. |
long |
vFind(long base,
long size)
Search for virtual memory of the right type. |
Method Detail |
---|
boolean contains(long base, long size)
base
- The physical address of the beginning of the memory region.size
- The size of the memory region.
java.lang.IllegalArgumentException
- Thrown if base
or size
is negative.
OffsetOutOfBoundsException
- Thrown if base
is less than zero.
SizeOutOfBoundsException
- Thrown if base
plus
size
would be greater than the physical addressing range of the processor.PhysicalMemoryManager.isRemovable(long, long)
long find(long base, long size)
base
- The physical address at which to start searching.size
- The amount of memory to be found.
OffsetOutOfBoundsException
- Thrown if base
is less than zero.
SizeOutOfBoundsException
- Thrown if base
plus
size
would be greater than the physical addressing range of the processor.
java.lang.IllegalArgumentException
- Thrown if base
or size
is negative.int getVMAttributes()
this
. The value of this
field is as defined for the POSIX mmap
function's
prot
parameter for the
platform. The meaning of the bits is platform-dependent.
POSIX defines constants for PROT_READ, PROT_WRITE, PROT_EXEC, and PROT_NONE.
int getVMFlags()
this
. The value of this
field is as defined for the POSIX mmap
function's flags
parameter for the
platform. The meaning of the bits is platform-dependent.
POSIX defines constants for MAP_SHARED, MAP_PRIVATE, and MAP_FIXED.
void initialize(long base, long vBase, long size)
base
- The address of the beginning of the physical memory region.vBase
- The address of the beginning of the virtual memory region.size
- The size of the memory region.
java.lang.IllegalArgumentException
- Thrown if base
or size
is negative.
OffsetOutOfBoundsException
- Thrown if base
is less than zero.
SizeOutOfBoundsException
- Thrown if base
plus
size
would be greater than the physical addressing range of the processor, or
vBase
plus size
would exceed the virtual addressing range of the processor.boolean isPresent(long base, long size)
base
- The address of the beginning of the memory region.size
- The size of the memory region.
java.lang.IllegalArgumentException
- if the base and size do not fall into
this type of memory.
OffsetOutOfBoundsException
- Thrown if base
is less than zero.
SizeOutOfBoundsException
- Thrown if base
plus
size
would be greater than the physical addressing range of the processor.PhysicalMemoryManager.isRemoved(long, long)
boolean isRemovable()
void onInsertion(long base, long size, AsyncEvent ae)
AsyncEvent
to fire when any memory of this type
in the range is
added to the system.
base
- The starting address in physical memory.size
- The size of the memory area.ae
- The async event to fire.
java.lang.IllegalArgumentException
- Thrown if ae
is null, or
if the specified
range contains no removable memory of this type.
IllegalArgumentException
may also be thrown
if size
is less than zero.
OffsetOutOfBoundsException
- Thrown if base
is less than zero.
SizeOutOfBoundsException
- Thrown if base
plus
size
would be greater than the physical addressing range of the processor.void onInsertion(long base, long size, AsyncEventHandler aeh)
AsyncEventHandler
to run when any memory of this
type, and in the range is
added to the system.
If the size or the base is less than 0, unregister all "onInsertion" references to the handler.
Note: This method only removes handlers that were registered with the same method. It has no effect on handlers that were registered using an associated async event.
base
- The starting address in physical memory.size
- The size of the memory area.aeh
- The handler to register.
java.lang.IllegalArgumentException
- Thrown if the specified
range contains no removable memory, or if aeh
is null and
size
and base
are both greater than or equal to zero.
SizeOutOfBoundsException
- Thrown if base
plus
size
would be greater than the physical addressing range of the processor.void onRemoval(long base, long size, AsyncEvent ae)
base
- The starting address in physical memory.size
- The size of the memory area.ae
- The async event to register.
java.lang.IllegalArgumentException
- Thrown if the specified
range contains no removable memory of this type,
if ae
is null, or
if size
is less than zero.
OffsetOutOfBoundsException
- Thrown if base
is less than zero.
SizeOutOfBoundsException
- Thrown if base
plus
size
would be greater than the physical addressing range of the processor.void onRemoval(long base, long size, AsyncEventHandler aeh)
size
or base
is less than 0, unregister all "onRemoval"
references to the handler parameter.
Note: This method only removes handlers that were registered with the same method. It has no effect on handlers that were registered using an associated async event.
base
- The starting address in physical memory.size
- The size of the memory area.aeh
- The handler to register.
java.lang.IllegalArgumentException
- Thrown if the specified
range contains no removable memory known to this filter, if aeh
is null and
size
and base
are both greater than or equal to zero.
SizeOutOfBoundsException
- Thrown if base
plus
size
would be greater than the physical addressing range of the processor.boolean unregisterInsertionEvent(long base, long size, AsyncEvent ae)
ae
of null matches all values
of ae
and will unregister every ae
that matches the address range.
Note: This method has no effect on handlers registered directly as async event handlers.
base
- The starting address in physical memory associated with ae
.size
- The size of the memory area associated with ae
.ae
- The event to unregister.
java.lang.IllegalArgumentException
- Thrown if
size
is less than 0.
OffsetOutOfBoundsException
- Thrown if base
is less than zero.
SizeOutOfBoundsException
- Thrown if base
plus
size
would be greater than the physical addressing range of the processor.boolean unregisterRemovalEvent(long base, long size, AsyncEvent ae)
ae
of null matches all values
of ae
and will unregister every ae
that matches the address range.
Note: This method has no effect on handlers registered directly as async event handlers.
base
- The starting address in physical memory associated with ae
.size
- The size of the memory area associated with ae
.ae
- The async event to unregister.
java.lang.IllegalArgumentException
- Thrown if
size
is less than 0.
OffsetOutOfBoundsException
- Thrown if base
is less than zero.
SizeOutOfBoundsException
- Thrown if base
plus
size
would be greater than the physical addressing range of the processor.long vFind(long base, long size)
base
- The address at which to start searching.size
- The amount of memory to be found.
OffsetOutOfBoundsException
- Thrown if base
is less than zero.
SizeOutOfBoundsException
- Thrown if base
plus
size
would be greater than the physical addressing range of the processor.
java.lang.IllegalArgumentException
- Thrown if base
or size
is negative.
IllegalArgumentException
may also be thrown if
base
is an invalid virtual address.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |