Class ecs_block_allocator_t

java.lang.Object
com.github.elebras1.flecs.ecs_block_allocator_t

public class ecs_block_allocator_t extends Object
struct ecs_block_allocator_t {
    int32_t data_size;
    int32_t chunk_size;
    int32_t chunks_per_block;
    int32_t block_size;
    ecs_block_allocator_chunk_header_t *head;
    ecs_block_allocator_block_t *block_head;
}
  • Method Details

    • layout

      public static final GroupLayout layout()
      The layout of this struct
    • data_size$layout

      public static final ValueLayout.OfInt data_size$layout()
      Layout for field:
      int32_t data_size
      
    • data_size$offset

      public static final long data_size$offset()
      Offset for field:
      int32_t data_size
      
    • data_size

      public static int data_size(MemorySegment struct)
      Getter for field:
      int32_t data_size
      
    • data_size

      public static void data_size(MemorySegment struct, int fieldValue)
      Setter for field:
      int32_t data_size
      
    • chunk_size$layout

      public static final ValueLayout.OfInt chunk_size$layout()
      Layout for field:
      int32_t chunk_size
      
    • chunk_size$offset

      public static final long chunk_size$offset()
      Offset for field:
      int32_t chunk_size
      
    • chunk_size

      public static int chunk_size(MemorySegment struct)
      Getter for field:
      int32_t chunk_size
      
    • chunk_size

      public static void chunk_size(MemorySegment struct, int fieldValue)
      Setter for field:
      int32_t chunk_size
      
    • chunks_per_block$layout

      public static final ValueLayout.OfInt chunks_per_block$layout()
      Layout for field:
      int32_t chunks_per_block
      
    • chunks_per_block$offset

      public static final long chunks_per_block$offset()
      Offset for field:
      int32_t chunks_per_block
      
    • chunks_per_block

      public static int chunks_per_block(MemorySegment struct)
      Getter for field:
      int32_t chunks_per_block
      
    • chunks_per_block

      public static void chunks_per_block(MemorySegment struct, int fieldValue)
      Setter for field:
      int32_t chunks_per_block
      
    • block_size$layout

      public static final ValueLayout.OfInt block_size$layout()
      Layout for field:
      int32_t block_size
      
    • block_size$offset

      public static final long block_size$offset()
      Offset for field:
      int32_t block_size
      
    • block_size

      public static int block_size(MemorySegment struct)
      Getter for field:
      int32_t block_size
      
    • block_size

      public static void block_size(MemorySegment struct, int fieldValue)
      Setter for field:
      int32_t block_size
      
    • head$layout

      public static final AddressLayout head$layout()
      Layout for field:
      ecs_block_allocator_chunk_header_t *head
      
    • head$offset

      public static final long head$offset()
      Offset for field:
      ecs_block_allocator_chunk_header_t *head
      
    • head

      public static MemorySegment head(MemorySegment struct)
      Getter for field:
      ecs_block_allocator_chunk_header_t *head
      
    • head

      public static void head(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      ecs_block_allocator_chunk_header_t *head
      
    • block_head$layout

      public static final AddressLayout block_head$layout()
      Layout for field:
      ecs_block_allocator_block_t *block_head
      
    • block_head$offset

      public static final long block_head$offset()
      Offset for field:
      ecs_block_allocator_block_t *block_head
      
    • block_head

      public static MemorySegment block_head(MemorySegment struct)
      Getter for field:
      ecs_block_allocator_block_t *block_head
      
    • block_head

      public static void block_head(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      ecs_block_allocator_block_t *block_head
      
    • asSlice

      public static MemorySegment asSlice(MemorySegment array, long index)
      Obtains a slice of arrayParam which selects the array element at index. The returned segment has address arrayParam.address() + index * layout().byteSize()
    • sizeof

      public static long sizeof()
      The size (in bytes) of this struct
    • allocate

      public static MemorySegment allocate(SegmentAllocator allocator)
      Allocate a segment of size layout().byteSize() using allocator
    • allocateArray

      public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of size elementCount using allocator. The returned segment has size elementCount * layout().byteSize().
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size layout().byteSize()
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size elementCount * layout().byteSize()