Class RPmallocGlobalStatistics

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class RPmallocGlobalStatistics
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource

    Member documentation

    • mapped – Current amount of virtual memory mapped, all of which might not have been committed (only if ENABLE_STATISTICS=1)
    • mapped_peak – Peak amount of virtual memory mapped, all of which might not have been committed (only if ENABLE_STATISTICS=1)
    • cached – Current amount of memory in global caches for small and medium sizes (<32KiB)
    • huge_alloc – Current amount of memory allocated in huge allocations, i.e larger than LARGE_SIZE_LIMIT which is 2MiB by default (only if ENABLE_STATISTICS=1)
    • huge_alloc_peak – Peak amount of memory allocated in huge allocations, i.e larger than LARGE_SIZE_LIMIT which is 2MiB by default (only if ENABLE_STATISTICS=1)
    • mapped_total – Total amount of memory mapped since initialization (only if ENABLE_STATISTICS=1)
    • unmapped_total – Total amount of memory unmapped since initialization (only if ENABLE_STATISTICS=1)

    Layout

    
     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 Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MAPPED, MAPPED_PEAK, CACHED, HUGE_ALLOC, HUGE_ALLOC_PEAK, MAPPED_TOTAL, UNMAPPED_TOTAL

        The struct member offsets.
    • Constructor Detail

      • RPmallocGlobalStatistics

        public RPmallocGlobalStatistics​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • 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.
      • mallocStack

        public static RPmallocGlobalStatistics mallocStack()
        Returns a new RPmallocGlobalStatistics instance allocated on the thread-local MemoryStack.
      • callocStack

        public static RPmallocGlobalStatistics callocStack()
        Returns a new RPmallocGlobalStatistics instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static RPmallocGlobalStatistics mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new RPmallocGlobalStatistics instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static RPmallocGlobalStatistics callocStack​(org.lwjgl.system.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
      • callocStack

        public static RPmallocGlobalStatistics.Buffer callocStack​(int capacity,
                                                                  org.lwjgl.system.MemoryStack stack)
        Returns a new RPmallocGlobalStatistics.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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().