Class hwloc_info_s

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class hwloc_info_s extends Struct<hwloc_info_s> implements NativeResource

 struct hwloc_info_s {
     char * name;
     char * value;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int NAME
      The struct member offsets.
    • VALUE

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

    • hwloc_info_s

      public hwloc_info_s(ByteBuffer container)
      Creates a hwloc_info_s 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<hwloc_info_s>
    • name

      public ByteBuffer name()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the name field.
    • nameString

      public String nameString()
      Returns:
      the null-terminated string pointed to by the name field.
    • value

      public ByteBuffer value()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the value field.
    • valueString

      public String valueString()
      Returns:
      the null-terminated string pointed to by the value field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static hwloc_info_s.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new hwloc_info_s.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
    • nname

      public static ByteBuffer nname(long struct)
      Unsafe version of name().
    • nnameString

      public static String nnameString(long struct)
      Unsafe version of nameString().
    • nvalue

      public static ByteBuffer nvalue(long struct)
      Unsafe version of value().
    • nvalueString

      public static String nvalueString(long struct)
      Unsafe version of valueString().