@SCJAllowed(value=INFRASTRUCTURE) public class MemoryArea extends java.lang.Object implements javax.realtime.AllocationContext
| Modifier and Type | Field and Description |
|---|---|
protected static int |
backingStoreBase |
protected static int |
backingStoreEnd |
protected static MemoryArea |
currentActiveArea |
protected vm.Memory |
delegate |
protected static MemoryArea |
head
Singleton reference for the immortal memory.
|
(package private) MemoryArea |
innerArea
Inner area for enterPrivateMemory.
|
(package private) static int |
memoryLevel |
(package private) MemoryArea |
next |
(package private) MemoryArea |
prev |
| Modifier | Constructor and Description |
|---|---|
protected |
MemoryArea(int size)
Creates a new memory area.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static void |
allocateBackingStore(int size) |
(package private) void |
enter(java.lang.Runnable logic)
Makes this memory area the allocation context for the execution of the
run() method of the instance of Runnable given
in the constructor. |
(package private) void |
enterMemory(int size,
java.lang.Runnable logic)
Helper method for
ManagedMemory.enterPrivateMemory |
(package private) void |
executeInArea(java.lang.Runnable logic)
Executes
logic in this memory area, with no cleanup and no
pointer reset at the end. |
static MemoryArea[] |
getContexts(java.lang.Object object) |
(package private) static MemoryArea |
getCurrentMemory()
Return the memory region which we are currently in.
|
static MemoryArea |
getMemoryArea(java.lang.Object object) |
int |
getMemoryAreaLevel() |
long |
memoryConsumed() |
long |
memoryRemaining() |
(package private) void |
removeArea() |
long |
size() |
protected static MemoryArea head
protected static MemoryArea currentActiveArea
protected static int backingStoreEnd
protected static int backingStoreBase
protected vm.Memory delegate
MemoryArea next
MemoryArea prev
static int memoryLevel
MemoryArea innerArea
protected MemoryArea(int size)
size - The size of this new memory area.public int getMemoryAreaLevel()
public static MemoryArea[] getContexts(java.lang.Object object)
void removeArea()
@SCJAllowed(value=INFRASTRUCTURE) void enter(java.lang.Runnable logic) throws java.lang.IllegalArgumentException
run() method of the instance of Runnable given
in the constructor. Runnable's run method exits.
This method is like the executeInArea method, but extended
with cleanup and pointer reset.
logic - The Runnable object whose run()
method shall be executed.java.lang.IllegalArgumentException - Thrown if the caller is a schedulable object and
logic is null.static MemoryArea getCurrentMemory()
@SCJAllowed public static MemoryArea getMemoryArea(java.lang.Object object)
object - An object.object is allocated.@SCJAllowed void executeInArea(java.lang.Runnable logic) throws java.lang.IllegalArgumentException
logic in this memory area, with no cleanup and no
pointer reset at the end.logic - The Runnable object whose run() method shall be executed.java.lang.IllegalArgumentException - If logic is null.@SCJAllowed public long memoryConsumed()
memoryConsumed in interface javax.realtime.AllocationContext@SCJAllowed public long memoryRemaining()
memoryRemaining in interface javax.realtime.AllocationContext@SCJAllowed public long size()
size in interface javax.realtime.AllocationContextstatic void allocateBackingStore(int size)
void enterMemory(int size,
java.lang.Runnable logic)
ManagedMemory.enterPrivateMemorysize - The size of inner private memorylogic - The logic to be executed in inner private memory