Class RPmallocGlobalStatistics

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class RPmallocGlobalStatistics extends Struct<RPmallocGlobalStatistics> implements NativeResource

 struct rpmalloc_global_statistics_t {
     size_t mapped;
     size_t mapped_peak;
     size_t cached;
     size_t huge_alloc;
     size_t huge_alloc_peak;
     size_t mapped_total;
     size_t unmapped_total;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int MAPPED
      The struct member offsets.
    • MAPPED_PEAK

      public static final int MAPPED_PEAK
      The struct member offsets.
    • CACHED

      public static final int CACHED
      The struct member offsets.
    • HUGE_ALLOC

      public static final int HUGE_ALLOC
      The struct member offsets.
    • HUGE_ALLOC_PEAK

      public static final int HUGE_ALLOC_PEAK
      The struct member offsets.
    • MAPPED_TOTAL

      public static final int MAPPED_TOTAL
      The struct member offsets.
    • UNMAPPED_TOTAL

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

    • RPmallocGlobalStatistics

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

      public long mapped()
      Returns:
      the value of the mapped field.
    • mapped_peak

      public long mapped_peak()
      Returns:
      the value of the mapped_peak field.
    • cached

      public long cached()
      Returns:
      the value of the cached field.
    • huge_alloc

      public long huge_alloc()
      Returns:
      the value of the huge_alloc field.
    • huge_alloc_peak

      public long huge_alloc_peak()
      Returns:
      the value of the huge_alloc_peak field.
    • mapped_total

      public long mapped_total()
      Returns:
      the value of the mapped_total field.
    • unmapped_total

      public long unmapped_total()
      Returns:
      the value of the unmapped_total field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nmapped(long struct)
      Unsafe version of mapped().
    • nmapped_peak

      public static long nmapped_peak(long struct)
      Unsafe version of mapped_peak().
    • ncached

      public static long ncached(long struct)
      Unsafe version of cached().
    • nhuge_alloc

      public static long nhuge_alloc(long struct)
      Unsafe version of huge_alloc().
    • nhuge_alloc_peak

      public static long nhuge_alloc_peak(long struct)
      Unsafe version of huge_alloc_peak().
    • nmapped_total

      public static long nmapped_total(long struct)
      Unsafe version of mapped_total().
    • nunmapped_total

      public static long nunmapped_total(long struct)
      Unsafe version of unmapped_total().