Class mi_heap_area_t

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class mi_heap_area_t extends Struct<mi_heap_area_t> implements NativeResource
struct mi_heap_area_t {
    void * blocks;
    size_t reserved;
    size_t committed;
    size_t used;
    size_t block_size;
    size_t full_block_size;
    void * reserved1;
}
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • BLOCKS

      public static final int BLOCKS
      The struct member offsets.
    • RESERVED

      public static final int RESERVED
      The struct member offsets.
    • COMMITTED

      public static final int COMMITTED
      The struct member offsets.
    • USED

      public static final int USED
      The struct member offsets.
    • BLOCK_SIZE

      public static final int BLOCK_SIZE
      The struct member offsets.
    • FULL_BLOCK_SIZE

      public static final int FULL_BLOCK_SIZE
      The struct member offsets.
    • RESERVED1

      public static final int RESERVED1
      The struct member offsets.
  • Constructor Details

    • mi_heap_area_t

      public mi_heap_area_t(ByteBuffer container)
      Creates a mi_heap_area_t instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<mi_heap_area_t>
    • blocks

      @NativeType("void *") public long blocks()
      Returns:
      the value of the blocks field.
    • reserved

      @NativeType("size_t") public long reserved()
      Returns:
      the value of the reserved field.
    • committed

      @NativeType("size_t") public long committed()
      Returns:
      the value of the committed field.
    • used

      @NativeType("size_t") public long used()
      Returns:
      the value of the used field.
    • block_size

      @NativeType("size_t") public long block_size()
      Returns:
      the value of the block_size field.
    • full_block_size

      @NativeType("size_t") public long full_block_size()
      Returns:
      the value of the full_block_size field.
    • blocks

      public mi_heap_area_t blocks(@NativeType("void *") long value)
      Sets the specified value to the blocks field.
    • reserved

      public mi_heap_area_t reserved(@NativeType("size_t") long value)
      Sets the specified value to the reserved field.
    • committed

      public mi_heap_area_t committed(@NativeType("size_t") long value)
      Sets the specified value to the committed field.
    • used

      public mi_heap_area_t used(@NativeType("size_t") long value)
      Sets the specified value to the used field.
    • block_size

      public mi_heap_area_t block_size(@NativeType("size_t") long value)
      Sets the specified value to the block_size field.
    • full_block_size

      public mi_heap_area_t full_block_size(@NativeType("size_t") long value)
      Sets the specified value to the full_block_size field.
    • set

      public mi_heap_area_t set(long blocks, long reserved, long committed, long used, long block_size, long full_block_size)
      Initializes this struct with the specified values.
    • set

      public mi_heap_area_t set(mi_heap_area_t src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static mi_heap_area_t malloc()
      Returns a new mi_heap_area_t instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static mi_heap_area_t calloc()
      Returns a new mi_heap_area_t instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static mi_heap_area_t create()
      Returns a new mi_heap_area_t instance allocated with BufferUtils.
    • create

      public static mi_heap_area_t create(long address)
      Returns a new mi_heap_area_t instance for the specified memory address.
    • createSafe

      public static @Nullable mi_heap_area_t createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static mi_heap_area_t.Buffer malloc(int capacity)
      Returns a new mi_heap_area_t.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static mi_heap_area_t.Buffer calloc(int capacity)
      Returns a new mi_heap_area_t.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static mi_heap_area_t.Buffer create(int capacity)
      Returns a new mi_heap_area_t.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static mi_heap_area_t.Buffer create(long address, int capacity)
      Create a mi_heap_area_t.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable mi_heap_area_t.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static mi_heap_area_t malloc(MemoryStack stack)
      Returns a new mi_heap_area_t instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static mi_heap_area_t calloc(MemoryStack stack)
      Returns a new mi_heap_area_t instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static mi_heap_area_t.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new mi_heap_area_t.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static mi_heap_area_t.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new mi_heap_area_t.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nblocks

      public static long nblocks(long struct)
      Unsafe version of blocks().
    • nreserved

      public static long nreserved(long struct)
      Unsafe version of reserved().
    • ncommitted

      public static long ncommitted(long struct)
      Unsafe version of committed().
    • nused

      public static long nused(long struct)
      Unsafe version of used().
    • nblock_size

      public static long nblock_size(long struct)
      Unsafe version of block_size().
    • nfull_block_size

      public static long nfull_block_size(long struct)
      Unsafe version of full_block_size().
    • nblocks

      public static void nblocks(long struct, long value)
      Unsafe version of blocks.
    • nreserved

      public static void nreserved(long struct, long value)
      Unsafe version of reserved.
    • ncommitted

      public static void ncommitted(long struct, long value)
      Unsafe version of committed.
    • nused

      public static void nused(long struct, long value)
      Unsafe version of used.
    • nblock_size

      public static void nblock_size(long struct, long value)
      Unsafe version of block_size.
    • nfull_block_size

      public static void nfull_block_size(long struct, long value)
      Unsafe version of full_block_size.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate