| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.realtime.MemoryArea
javax.realtime.ScopedMemory
javax.realtime.VTPhysicalMemory
public class VTPhysicalMemory
An instance of VTPhysicalMemory allows objects to be allocated from
 a range of physical memory with particular attributes, determined by
 their memory type. This memory area has the same semantics
  as ScopedMemory memory areas, and the same performance
 restrictions as VTMemory.
 
  Methods from VTPhysicalMemory should be overridden only by methods that
  use super.
MemoryArea, 
ScopedMemory, 
VTMemory, 
LTMemory, 
LTPhysicalMemory, 
ImmortalPhysicalMemory, 
RealtimeThread, 
NoHeapRealtimeThread| Constructor Summary | |
|---|---|
VTPhysicalMemory(java.lang.Object type,
                 long size)
Create an instance of VTPhysicalMemory with the given parameters. | 
|
VTPhysicalMemory(java.lang.Object type,
                 long base,
                 long size)
Create an instance of VTPhysicalMemory with the given parameters. | 
|
VTPhysicalMemory(java.lang.Object type,
                 long base,
                 long size,
                 java.lang.Runnable logic)
Create an instance of VTPhysicalMemory with the given parameters. | 
|
VTPhysicalMemory(java.lang.Object type,
                 long size,
                 java.lang.Runnable logic)
Create an instance of VTPhysicalMemory with the given parameters. | 
|
VTPhysicalMemory(java.lang.Object type,
                 long base,
                 SizeEstimator size)
Create an instance of VTPhysicalMemory with the given parameters. | 
|
VTPhysicalMemory(java.lang.Object type,
                 long base,
                 SizeEstimator size,
                 java.lang.Runnable logic)
Create an instance of VTPhysicalMemory with the given parameters. | 
|
VTPhysicalMemory(java.lang.Object type,
                 SizeEstimator size)
Create an instance of VTPhysicalMemory with the given parameters. | 
|
VTPhysicalMemory(java.lang.Object type,
                 SizeEstimator size,
                 java.lang.Runnable logic)
Create an instance of VTPhysicalMemory with the given parameters. | 
|
| Method Summary | |
|---|---|
 void | 
enter()
Associate this memory area with the current schedulable object for the duration of the execution of the run() method of the
 instance of Runnable given in the constructor. | 
 void | 
enter(java.lang.Runnable logic)
Associate this memory area with the current schedulable object for the duration of the execution of the run()
 method of the given Runnable. | 
 void | 
joinAndEnter()
In the error-free case, joinAndEnter combines 
 join();enter(); such that no enter() from
 another schedulable object can intervene between the two method invocations. | 
 void | 
joinAndEnter(HighResolutionTime time)
In the error-free case, joinAndEnter combines 
 join();enter(); such that no enter() from
 another schedulable object can intervene between the two method invocations. | 
 void | 
joinAndEnter(java.lang.Runnable logic)
In the error-free case, joinAndEnter combines 
 join();enter(); such that no enter() from
 another schedulable object can intervene between the two method invocations. | 
 void | 
joinAndEnter(java.lang.Runnable logic,
             HighResolutionTime time)
In the error-free case, joinAndEnter combines 
 join();enter(); such that no enter() from
 another schedulable object can intervene between the two method invocations. | 
 long | 
size()
Query the size of the memory area.  | 
 java.lang.String | 
toString()
Creates a string representing this object.  | 
| Methods inherited from class javax.realtime.ScopedMemory | 
|---|
executeInArea, getMaximumSize, getPortal, getReferenceCount, join, join, newArray, newInstance, newInstance, setPortal | 
| Methods inherited from class javax.realtime.MemoryArea | 
|---|
getMemoryArea, memoryConsumed, memoryRemaining | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public VTPhysicalMemory(java.lang.Object type,
                        long size)
VTPhysicalMemory with the given parameters.
type - An instance of Object representing the type of
        memory required (e.g., dma, shared) - used to define the base address
              and control the mapping.  If the required memory has more than one
      attribute, type may be an array of objects.  If type
      is null or a reference to an array with no entries, any type of memory
      is acceptable.size - The size of the area in bytes.
java.lang.SecurityException - Thrown if the application doesn't have
         permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException - Thrown if 
         the implementation detects that size extends
          beyond physically addressable memory.
UnsupportedPhysicalMemoryException - Thrown if the underlying 
            hardware does not support the given type, or if no matching
          PhysicalMemoryTypeFilter has been registered with
          the PhysicalMemoryManager.
MemoryTypeConflictException - Thrown if the specified base does not point to
         memory that matches the requested type, or if type specifies
         incompatible memory attributes.
java.lang.IllegalArgumentException - Thrown if size is less than zero.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type,
                        long base,
                        long size)
VTPhysicalMemory with the given parameters.
type - An instance of Object representing the type of
        memory required (e.g., dma, shared) - used to define the base address
              and control the mapping.   If the required memory has more than one
      attribute, type may be an array of objects.  If type
      is null or a reference to an array with no entries, any type of memory
      is acceptable.base - The physical memory address of the area.size - The size of the area in bytes.
java.lang.SecurityException - Thrown if the application doesn't have
         permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException - Thrown if 
         the implementation detects that size extends
          beyond physically addressable memory.
OffsetOutOfBoundsException - Thrown if the base address is invalid.
UnsupportedPhysicalMemoryException - Thrown if the underlying 
            hardware does not support the given type, or if no matching
          PhysicalMemoryTypeFilter has been registered with
          the PhysicalMemoryManager.
MemoryTypeConflictException - Thrown if the specified base does not point to
         memory that matches the requested type, or if type specifies
         incompatible memory attributes.
MemoryInUseException - Thrown if the specified memory is already in use.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type,
                        SizeEstimator size)
VTPhysicalMemory with the given parameters.
type - An instance of Object representing the type of
        memory required (e.g., dma, shared) - used to define the base address
              and control the mapping.  If the required memory has more than one
      attribute, type may be an array of objects.  If type
      is null or a reference to an array with no entries, any type of memory
      is acceptable.size - A size estimator for this area.
java.lang.SecurityException - Thrown if the application doesn't have
         permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException - Thrown if 
         the implementation detects that the size 
          estimate from size extends
          beyond physically addressable memory.
UnsupportedPhysicalMemoryException - Thrown if the underlying 
            hardware does not support the given type, or if no matching
          PhysicalMemoryTypeFilter has been registered with
          the PhysicalMemoryManager.
MemoryTypeConflictException - Thrown if the specified base does not point to
         memory that matches the requested type, or if type specifies
         incompatible memory attributes.
java.lang.IllegalArgumentException - Thrown if size is null.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type,
                        long base,
                        SizeEstimator size)
VTPhysicalMemory with the given parameters.
type - An instance of Object representing the type of
        memory required (e.g., dma, shared) - used to define the base address
              and control the mapping.  If the required memory has more than one
      attribute, type may be an array of objects.  If type
      is null or a reference to an array with no entries, any type of memory
      is acceptable.base - The physical memory address of the area.size - A size estimator for this memory area.
java.lang.SecurityException - Thrown if the application doesn't have
         permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException - Thrown if 
         the implementation detects that the size 
          estimate from size extends
          beyond physically addressable memory.
OffsetOutOfBoundsException - Thrown if the base address is invalid.
UnsupportedPhysicalMemoryException - Thrown if the underlying 
            hardware does not support the given type, or if no matching
          PhysicalMemoryTypeFilter has been registered with
          the PhysicalMemoryManager.
MemoryTypeConflictException - Thrown if the specified base does not point to
         memory that matches the requested type, or if type specifies
         incompatible memory attributes.
MemoryInUseException - Thrown if the specified memory is already in use.
java.lang.IllegalArgumentException - Thrown if size is null.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type,
                        long size,
                        java.lang.Runnable logic)
VTPhysicalMemory with the given parameters.
type - An instance of Object representing the type of
        memory required (e.g., dma, shared) - used to define the base address
              and control the mapping.  If the required memory has more than one
      attribute, type may be an array of objects.  If type
      is null or a reference to an array with no entries, any type of memory
      is acceptable.size - The size of the area in bytes.logic - The run() method of this object will be 
        called whenever MemoryArea.enter() is called.  If logic is null,
          logic must be supplied when the memory area is entered.
java.lang.SecurityException - Thrown if the application doesn't have
         permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException - Thrown if 
         the implementation detects that size extends
          beyond physically addressable memory.
UnsupportedPhysicalMemoryException - Thrown if the underlying 
            hardware does not support the given type, or if no matching
          PhysicalMemoryTypeFilter has been registered with
          the PhysicalMemoryManager.
MemoryTypeConflictException - Thrown if the specified base does not point to
         memory that matches the requested type, or if type specifies
         incompatible memory attributes.
IllegalAssignmentError - Thrown if storing logic in this
 would violate the assignment rules.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type,
                        long base,
                        long size,
                        java.lang.Runnable logic)
VTPhysicalMemory with the given parameters.
type - An instance of Object representing the type of
        memory required (e.g., dma, shared) - used to define the base address
              and control the mapping.  If the required memory has more than one
      attribute, type may be an array of objects.  If type
      is null or a reference to an array with no entries, any type of memory
      is acceptable.base - The physical memory address of the area.size - The size of the area in bytes.logic - The run() method of this object will be 
        called whenever MemoryArea.enter() is called.  If logic is null,
          logic must be supplied when the memory area is entered.
SizeOutOfBoundsException - Thrown if 
         the implementation detects that size extends
          beyond physically addressable memory.
java.lang.SecurityException - Thrown if the application doesn't have
         permissions to access physical memory or the given range of memory.
OffsetOutOfBoundsException - Thrown if the base address is invalid.
UnsupportedPhysicalMemoryException - Thrown if the underlying 
            hardware does not support the given type, or if no matching
          PhysicalMemoryTypeFilter has been registered with
          the PhysicalMemoryManager.
MemoryTypeConflictException - Thrown if the specified base does not point to
         memory that matches the requested type, or if type specifies
         incompatible memory attributes.
MemoryInUseException - Thrown if the specified memory is already in use.
IllegalAssignmentError - Thrown if storing logic in this
 would violate the assignment rules.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type,
                        SizeEstimator size,
                        java.lang.Runnable logic)
VTPhysicalMemory with the given parameters.
type - An instance of Object representing the type of
        memory required (e.g., dma, shared) - used to define the base address
              and control the mapping.  If the required memory has more than one
      attribute, type may be an array of objects.  If type
      is null or a reference to an array with no entries, any type of memory
      is acceptable.size - A size estimator for this area.logic - The run() method of this object will be 
        called whenever MemoryArea.enter() is called.  If logic is null,
          logic must be supplied when the memory area is entered.
java.lang.SecurityException - Thrown if the application doesn't have
         permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException - Thrown if 
         the implementation detects that the size 
          estimate from size extends
          beyond physically addressable memory.
UnsupportedPhysicalMemoryException - Thrown if the underlying 
            hardware does not support the given type, or if no matching
          PhysicalMemoryTypeFilter has been registered with
          the PhysicalMemoryManager.
MemoryTypeConflictException - Thrown if the specified base does not point to
         memory that matches the requested type, or if type specifies
         incompatible memory attributes.
java.lang.IllegalArgumentException - Thrown if size is null.
IllegalAssignmentError - Thrown if storing logic in this
 would violate the assignment rules.PhysicalMemoryManager
public VTPhysicalMemory(java.lang.Object type,
                        long base,
                        SizeEstimator size,
                        java.lang.Runnable logic)
VTPhysicalMemory with the given parameters.
type - An instance of Object representing the type of
        memory required (e.g., dma, shared) - used to define the base address
              and control the mapping.  If the required memory has more than one
      attribute, type may be an array of objects.  If type
      is null or a reference to an array with no entries, any type of memory
      is acceptable.base - The physical memory address of the area.size - A size estimator for this memory area.logic - The run() method of this object will be 
        called whenever MemoryArea.enter() is called.  If logic is null,
          logic must be supplied when the memory area is entered.
java.lang.SecurityException - Thrown if the application doesn't have
         permissions to access physical memory or the given range of memory.
SizeOutOfBoundsException - Thrown if 
         the implementation detects that the size 
          estimate from size extends
          beyond physically addressable memory.
OffsetOutOfBoundsException - Thrown if the base address is invalid.
UnsupportedPhysicalMemoryException - Thrown if the underlying 
            hardware does not support the given type, or if no matching
          PhysicalMemoryTypeFilter has been registered with
          the PhysicalMemoryManager.
MemoryTypeConflictException - Thrown if the specified base does not point to
         memory that matches the requested type, or if type specifies
         incompatible memory attributes.
MemoryInUseException - Thrown if the specified memory is already in use.
java.lang.IllegalArgumentException - Thrown if size is null.
IllegalAssignmentError - Thrown if storing logic in this
 would violate the assignment rules.PhysicalMemoryManager| Method Detail | 
|---|
public void enter()
run() method of the
 instance of Runnable given in the constructor. During this
 period of execution, this memory area becomes the default
 allocation context until another default allocation context is
 selected (using enter, or executeInArea (java.lang.Runnable))
 or the enter method exits.
enter in class ScopedMemoryScopedCycleException - Thrown if this invocation would break the single
          parent rule.
ThrowBoundaryError - Thrown when the JVM needs to propagate an exception allocated in this scope 
                to (or through) the memory area of the caller.  Storing a reference to that exception would cause
                an IllegalAssignmentError, so the JVM cannot be permitted to deliver the exception. 
                The ThrowBoundaryError is allocated in the current 
                allocation context and contains information about the exception it replaces.
java.lang.IllegalThreadStateException - Thrown when enter is invoked from a Java thread.
java.lang.IllegalArgumentException - Thrown no non-null value for logic
                was supplied when the memory area was constructed.public void enter(java.lang.Runnable logic)
run()
 method of the given Runnable.  During this period of execution,
 this memory area becomes the default allocation context until
 another default allocation context is selected (using
 enter, or
 executeInArea(java.lang.Runnable)) or the
 enter method exits.
enter in class ScopedMemorylogic - The Runnable object whose run() method 
              should be invoked.
ScopedCycleException - Thrown if this invocation would break the single
          parent rule.
ThrowBoundaryError - Thrown when the JVM needs to propagate an exception allocated in this scope 
                to (or through) the memory area of the caller.  Storing a reference to that exception would cause
                an IllegalAssignmentError, so the JVM cannot be permitted to deliver the exception. 
                The ThrowBoundaryError is allocated in the current 
                allocation context and contains information about the exception it replaces.
java.lang.IllegalThreadStateException - Thrown when enter is invoked from a Java thread.
java.lang.IllegalArgumentException - Thrown if logic
      is null.
public void joinAndEnter()
                  throws java.lang.InterruptedException
joinAndEnter combines 
 join();enter(); such that no enter() from
 another schedulable object can intervene between the two method invocations. 
 The resulting method
 will wait for the reference count on this ScopedMemory to reach zero,
 then enter the ScopedMemory and execute the run method from
 logic passed in the constructor. If no instance of Runnable 
 was passed to the memory area's constructor, 
 the method throws IllegalArgumentException immediately.
joinAndEnter in class ScopedMemoryjava.lang.InterruptedException - If this schedulable object is interrupted by
       RealtimeThread.interrupt() or 
      AsynchronouslyInterruptedException.fire()
      while waiting for the reference count to go to zero.
ThrowBoundaryError - Thrown when the JVM needs to propagate an exception allocated in this scope 
                to (or through) the memory area of the caller.  Storing a reference to that exception would cause
                an IllegalAssignmentError, so the JVM cannot be permitted to deliver the exception. 
                The ThrowBoundaryError is allocated in the current 
                allocation context and contains information about the exception it replaces.
java.lang.IllegalArgumentException - Thrown if no non-null logic value
                was supplied to the memory area's constructor.
public void joinAndEnter(HighResolutionTime time)
                  throws java.lang.InterruptedException
joinAndEnter combines 
 join();enter(); such that no enter() from
 another schedulable object can intervene between the two method invocations.  The resulting method
 will wait for the reference count on this ScopedMemory to reach zero, or
 for the current time to reach the designated time,
 then enter the ScopedMemory and execute the run method from
 Runnable object passed to the constructor.  If no instance of Runnable 
 was passed to the memory area's constructor, the method 
 throws IllegalArgumentException immediately.
  
  Note that expiration of time may cause control to enter the
  memory area before its reference count has gone to zero.
joinAndEnter in class ScopedMemorytime - The time that bounds the wait.
ThrowBoundaryError - Thrown when the JVM needs to propagate an exception allocated in this scope 
                to (or through) the memory area of the caller.  Storing a reference to that exception would cause
                an IllegalAssignmentError, so the JVM cannot be permitted to deliver the exception. 
                The ThrowBoundaryError is allocated in the current 
                allocation context and contains information about the exception it replaces.
java.lang.InterruptedException - If this schedulable object is interrupted by
       RealtimeThread.interrupt() or 
      AsynchronouslyInterruptedException.fire()
      while waiting for the reference count to go to zero.
ScopedCycleException - Thrown if this invocation would break the single
          parent rule.
java.lang.IllegalArgumentException - Thrown if time is null, or if
        no non-null logic value
                was supplied to the memory area's constructor.
public void joinAndEnter(java.lang.Runnable logic)
                  throws java.lang.InterruptedException
joinAndEnter combines 
 join();enter(); such that no enter() from
 another schedulable object can intervene between the two method invocations. The resulting method
 will wait for the reference count on this ScopedMemory to reach zero,
 then enter the ScopedMemory and execute the run method from
 logic
  If logic is null, throw IllegalArgumentException immediately.
joinAndEnter in class ScopedMemorylogic - The Runnable object which contains the code to execute.
java.lang.InterruptedException - If this schedulable object is interrupted by
       RealtimeThread.interrupt() or 
      AsynchronouslyInterruptedException.fire()
      while waiting for the reference count to go to zero.
ThrowBoundaryError - Thrown when the JVM needs to propagate an exception allocated in this scope 
                to (or through) the memory area of the caller.  Storing a reference to that exception would cause
                an IllegalAssignmentError, so the JVM cannot be permitted to deliver the exception. 
                The ThrowBoundaryError is allocated in the current 
                allocation context and contains information about the exception it replaces.
java.lang.IllegalArgumentException - Thrown if logic is null.
public void joinAndEnter(java.lang.Runnable logic,
                         HighResolutionTime time)
                  throws java.lang.InterruptedException
joinAndEnter combines 
 join();enter(); such that no enter() from
 another schedulable object can intervene between the two method invocations.  The resulting method
 will wait for the reference count on this ScopedMemory to reach zero, or
 for the current time to reach the designated time,
 then enter the ScopedMemory and execute the run method from
 logic.
        Throws IllegalArgumentException immediately if logic is null.
  
  Note that expiration of time may cause control to enter the
  memory area before its reference count has gone to zero.
joinAndEnter in class ScopedMemorylogic - The Runnable object which contains the code to execute.time - The time that bounds the wait.
java.lang.InterruptedException - If this schedulable object is interrupted by
       RealtimeThread.interrupt() or 
      AsynchronouslyInterruptedException.fire()
      while waiting for the reference count to go to zero.
ThrowBoundaryError - Thrown when the JVM needs to propagate an exception allocated in this scope 
                to (or through) the memory area of the caller.  Storing a reference to that exception would cause
                an IllegalAssignmentError, so the JVM cannot be permitted to deliver the exception. 
                The ThrowBoundaryError is allocated in the current 
                allocation context and contains information about the exception it replaces.
ScopedCycleException - Thrown if this invocation would break the single
          parent rule.
java.lang.IllegalArgumentException - Thrown if time or logic is null.public java.lang.String toString()
 (VTPhysicalMemory) Scoped memory # num 
  
 where num is a number that uniquely
  identifies this VTPhysicalMemory memory area.
toString in class ScopedMemorythis.public long size()
MemoryArea
size in class MemoryArea
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||