Class HeapElement
java.lang.Object
uk.ac.manchester.spinnaker.messages.model.HeapElement
An element of one of the heaps on SpiNNaker.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AppID
The application ID of the block if allocated, ornull
if not.final MemoryLocation
The address of the block.final boolean
True if the block is free.final MemoryLocation
A pointer to the next block, or 0 if none.final int
The usable size of this block (not including the header).final Integer
The tag of the block if allocated, ornull
if not. -
Constructor Summary
ConstructorsConstructorDescriptionHeapElement
(MemoryLocation blockAddress, MemoryLocation nextAddress, int free) -
Method Summary
Modifier and TypeMethodDescriptionfinal MemoryLocation
Gets the address of the data in the heap element.
-
Field Details
-
blockAddress
The address of the block. -
nextAddress
A pointer to the next block, or 0 if none. -
size
public final int sizeThe usable size of this block (not including the header). -
isFree
True if the block is free. -
tag
The tag of the block if allocated, ornull
if not. -
appID
The application ID of the block if allocated, ornull
if not.
-
-
Constructor Details
-
HeapElement
- Parameters:
blockAddress
- The address of this element on the heapnextAddress
- The address of the next element on the heapfree
- The "free" element of the block as read from the heap
-
-
Method Details
-
getDataAddress
Gets the address of the data in the heap element.- Returns:
- The address of the data (
size
bytes long) that immediately follows the heap element header.
-