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 Details

    • blockAddress

      public final MemoryLocation blockAddress
      The address of the block.
    • nextAddress

      @SARKField("next") public final MemoryLocation nextAddress
      A pointer to the next block, or 0 if none.
    • size

      public final int size
      The usable size of this block (not including the header).
    • isFree

      @SARKField("free") public final boolean isFree
      True if the block is free.
    • tag

      @SARKField("free") public final Integer tag
      The tag of the block if allocated, or null if not.
    • appID

      @SARKField("free") public final AppID appID
      The application ID of the block if allocated, or null if not.
  • Constructor Details

    • HeapElement

      public HeapElement(MemoryLocation blockAddress, MemoryLocation nextAddress, int free)
      Parameters:
      blockAddress - The address of this element on the heap
      nextAddress - The address of the next element on the heap
      free - The "free" element of the block as read from the heap
  • Method Details

    • getDataAddress

      public final MemoryLocation 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.