Package org.lwjgl.system.rpmalloc
Class RPmallocGlobalStatistics
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.rpmalloc.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.NativeResourceMember documentation
mapped– Current amount of virtual memory mapped (only ifENABLE_STATISTICS=1)cached– Current amount of memory in global caches for small and medium sizes (<64KiB)cached_large– Curren amount of memory in global caches for large sizes (>=64KiB)mapped_total– Total amount of memory mapped (only ifENABLE_STATISTICS=1)unmapped_total– Total amount of memory unmapped (only ifENABLE_STATISTICS=1)
Layout
struct rpmalloc_global_statistics_t { size_t mapped; size_t cached; size_t cached_large; size_t mapped_total; size_t unmapped_total; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classRPmallocGlobalStatistics.BufferAn array ofRPmallocGlobalStatisticsstructs.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor and Description RPmallocGlobalStatistics(java.nio.ByteBuffer container)Creates aRPmallocGlobalStatisticsinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description longcached_large()Returns the value of thecached_largefield.longcached()Returns the value of thecachedfield.static RPmallocGlobalStatisticscalloc()Returns a newRPmallocGlobalStatisticsinstance allocated withmemCalloc.static RPmallocGlobalStatistics.Buffercalloc(int capacity)Returns a newRPmallocGlobalStatistics.Bufferinstance allocated withmemCalloc.static RPmallocGlobalStatisticscallocStack()Returns a newRPmallocGlobalStatisticsinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static RPmallocGlobalStatistics.BuffercallocStack(int capacity)Returns a newRPmallocGlobalStatistics.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static RPmallocGlobalStatistics.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newRPmallocGlobalStatistics.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RPmallocGlobalStatisticscallocStack(org.lwjgl.system.MemoryStack stack)Returns a newRPmallocGlobalStatisticsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RPmallocGlobalStatisticscreate()Returns a newRPmallocGlobalStatisticsinstance allocated withBufferUtils.static RPmallocGlobalStatistics.Buffercreate(int capacity)Returns a newRPmallocGlobalStatistics.Bufferinstance allocated withBufferUtils.static RPmallocGlobalStatisticscreate(long address)Returns a newRPmallocGlobalStatisticsinstance for the specified memory address ornullif the address isNULL.static RPmallocGlobalStatistics.Buffercreate(long address, int capacity)Create aRPmallocGlobalStatistics.Bufferinstance at the specified memory.static RPmallocGlobalStatisticsmalloc()Returns a newRPmallocGlobalStatisticsinstance allocated withmemAlloc.static RPmallocGlobalStatistics.Buffermalloc(int capacity)Returns a newRPmallocGlobalStatistics.Bufferinstance allocated withmemAlloc.static RPmallocGlobalStatisticsmallocStack()Returns a newRPmallocGlobalStatisticsinstance allocated on the thread-localMemoryStack.static RPmallocGlobalStatistics.BuffermallocStack(int capacity)Returns a newRPmallocGlobalStatistics.Bufferinstance allocated on the thread-localMemoryStack.static RPmallocGlobalStatistics.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newRPmallocGlobalStatistics.Bufferinstance allocated on the specifiedMemoryStack.static RPmallocGlobalStatisticsmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newRPmallocGlobalStatisticsinstance allocated on the specifiedMemoryStack.longmapped_total()Returns the value of themapped_totalfield.longmapped()Returns the value of themappedfield.intsizeof()Returnssizeof(struct).longunmapped_total()Returns the value of theunmapped_totalfield.
-
-
-
Constructor Detail
-
RPmallocGlobalStatistics
public RPmallocGlobalStatistics(java.nio.ByteBuffer container)
Creates aRPmallocGlobalStatisticsinstance at the current position of the specifiedByteBuffercontainer. 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()
Description copied from class:org.lwjgl.system.StructReturnssizeof(struct).- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
mapped
public long mapped()
Returns the value of themappedfield.
-
cached
public long cached()
Returns the value of thecachedfield.
-
cached_large
public long cached_large()
Returns the value of thecached_largefield.
-
mapped_total
public long mapped_total()
Returns the value of themapped_totalfield.
-
unmapped_total
public long unmapped_total()
Returns the value of theunmapped_totalfield.
-
malloc
public static RPmallocGlobalStatistics malloc()
Returns a newRPmallocGlobalStatisticsinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static RPmallocGlobalStatistics calloc()
Returns a newRPmallocGlobalStatisticsinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static RPmallocGlobalStatistics create()
Returns a newRPmallocGlobalStatisticsinstance allocated withBufferUtils.
-
create
public static RPmallocGlobalStatistics create(long address)
Returns a newRPmallocGlobalStatisticsinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static RPmallocGlobalStatistics.Buffer malloc(int capacity)
Returns a newRPmallocGlobalStatistics.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static RPmallocGlobalStatistics.Buffer calloc(int capacity)
Returns a newRPmallocGlobalStatistics.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static RPmallocGlobalStatistics.Buffer create(int capacity)
Returns a newRPmallocGlobalStatistics.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static RPmallocGlobalStatistics.Buffer create(long address, int capacity)
Create aRPmallocGlobalStatistics.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static RPmallocGlobalStatistics mallocStack()
Returns a newRPmallocGlobalStatisticsinstance allocated on the thread-localMemoryStack.
-
callocStack
public static RPmallocGlobalStatistics callocStack()
Returns a newRPmallocGlobalStatisticsinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static RPmallocGlobalStatistics mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatisticsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static RPmallocGlobalStatistics callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatisticsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static RPmallocGlobalStatistics.Buffer mallocStack(int capacity)
Returns a newRPmallocGlobalStatistics.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static RPmallocGlobalStatistics.Buffer callocStack(int capacity)
Returns a newRPmallocGlobalStatistics.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static RPmallocGlobalStatistics.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatistics.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static RPmallocGlobalStatistics.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatistics.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-