@SCJAllowed public abstract class ManagedMemory extends MemoryArea
| Modifier and Type | Method and Description |
|---|---|
static void |
enterPrivateMemory(int size,
java.lang.Runnable logic)
Invoke the run method of logic with a fresh private memory area that
is immediately nested within the current
ManagedMemory
area, sized to provide size bytes of free memory
as the current allocation area. |
void |
executeInArea(java.lang.Runnable logic)
Executes
logic in this memory area, with no cleanup and no
pointer reset at the end. |
static void |
executeInAreaOf(java.lang.Object obj,
java.lang.Runnable logic) |
static void |
executeInOuterArea(java.lang.Runnable logic) |
long |
getRemainingBackingStore() |
getMemoryArea, memoryConsumed, memoryRemaining, size@SCJAllowed public 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 static void enterPrivateMemory(int size, java.lang.Runnable logic) throws java.lang.IllegalStateException
ManagedMemory
area, sized to provide size bytes of free memory
as the current allocation area.size - is the number of free bytes within the inner-nested private memory.logic - provides the run method that is to be executed within
the inner-nested private memory area.java.lang.IllegalStateException@SCJAllowed public static void executeInAreaOf(java.lang.Object obj, java.lang.Runnable logic)
@SCJAllowed public static void executeInOuterArea(java.lang.Runnable logic)
@SCJAllowed public long getRemainingBackingStore()