Class HeapElement
java.lang.Object
uk.ac.manchester.spinnaker.messages.model.HeapElement
@SARKStruct("block") public class HeapElement extends Object
An element of one of the heaps on SpiNNaker.
-
Field Summary
Fields Modifier and Type Field Description AppID
appID
The application ID of the block if allocated, ornull
if not.MemoryLocation
blockAddress
The address of the block.boolean
isFree
True if the block is free.MemoryLocation
nextAddress
A pointer to the next block, or 0 if none.int
size
The usable size of this block (not including the header).Integer
tag
The tag of the block if allocated, ornull
if not. -
Constructor Summary
Constructors Constructor Description HeapElement(MemoryLocation blockAddress, MemoryLocation nextAddress, int free)
-
Method Summary
Modifier and Type Method Description MemoryLocation
getDataAddress()
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.
-