Package org.lwjgl.system.rpmalloc
Class RPmallocThreadStatistics
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.rpmalloc.RPmallocThreadStatistics
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
public class RPmallocThreadStatistics extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceMember documentation
requested– Amount of memory currently requested in allocations (only ifENABLE_STATISTICS=1)allocated– Amount of memory actually allocated in memory blocks (only ifENABLE_STATISTICS=1)active– Current number of bytes available for allocation from active spanssizecache– Current number of bytes available in thread size class cachesspancache– Current number of bytes available in thread span cachesdeferred– Current number of bytes in pending deferred deallocationsthread_to_global– Total number of bytes transitioned from thread cache to global cacheglobal_to_thread– Total number of bytes transitioned from global cache to thread cache
Layout
struct rpmalloc_thread_statistics_t { size_t requested; size_t allocated; size_t active; size_t sizecache; size_t spancache; size_t deferred; size_t thread_to_global; size_t global_to_thread; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classRPmallocThreadStatistics.BufferAn array ofRPmallocThreadStatisticsstructs.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor and Description RPmallocThreadStatistics(java.nio.ByteBuffer container)Creates aRPmallocThreadStatisticsinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description longactive()Returns the value of theactivefield.longallocated()Returns the value of theallocatedfield.static RPmallocThreadStatisticscalloc()Returns a newRPmallocThreadStatisticsinstance allocated withmemCalloc.static RPmallocThreadStatistics.Buffercalloc(int capacity)Returns a newRPmallocThreadStatistics.Bufferinstance allocated withmemCalloc.static RPmallocThreadStatisticscallocStack()Returns a newRPmallocThreadStatisticsinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static RPmallocThreadStatistics.BuffercallocStack(int capacity)Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static RPmallocThreadStatistics.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RPmallocThreadStatisticscallocStack(org.lwjgl.system.MemoryStack stack)Returns a newRPmallocThreadStatisticsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RPmallocThreadStatisticscreate()Returns a newRPmallocThreadStatisticsinstance allocated withBufferUtils.static RPmallocThreadStatistics.Buffercreate(int capacity)Returns a newRPmallocThreadStatistics.Bufferinstance allocated withBufferUtils.static RPmallocThreadStatisticscreate(long address)Returns a newRPmallocThreadStatisticsinstance for the specified memory address ornullif the address isNULL.static RPmallocThreadStatistics.Buffercreate(long address, int capacity)Create aRPmallocThreadStatistics.Bufferinstance at the specified memory.longdeferred()Returns the value of thedeferredfield.longglobal_to_thread()Returns the value of theglobal_to_threadfield.static RPmallocThreadStatisticsmalloc()Returns a newRPmallocThreadStatisticsinstance allocated withmemAlloc.static RPmallocThreadStatistics.Buffermalloc(int capacity)Returns a newRPmallocThreadStatistics.Bufferinstance allocated withmemAlloc.static RPmallocThreadStatisticsmallocStack()Returns a newRPmallocThreadStatisticsinstance allocated on the thread-localMemoryStack.static RPmallocThreadStatistics.BuffermallocStack(int capacity)Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the thread-localMemoryStack.static RPmallocThreadStatistics.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the specifiedMemoryStack.static RPmallocThreadStatisticsmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newRPmallocThreadStatisticsinstance allocated on the specifiedMemoryStack.longrequested()Returns the value of therequestedfield.longsizecache()Returns the value of thesizecachefield.intsizeof()Returnssizeof(struct).longspancache()Returns the value of thespancachefield.longthread_to_global()Returns the value of thethread_to_globalfield.
-
-
-
Constructor Detail
-
RPmallocThreadStatistics
public RPmallocThreadStatistics(java.nio.ByteBuffer container)
Creates aRPmallocThreadStatisticsinstance 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
-
requested
public long requested()
Returns the value of therequestedfield.
-
allocated
public long allocated()
Returns the value of theallocatedfield.
-
active
public long active()
Returns the value of theactivefield.
-
sizecache
public long sizecache()
Returns the value of thesizecachefield.
-
spancache
public long spancache()
Returns the value of thespancachefield.
-
deferred
public long deferred()
Returns the value of thedeferredfield.
-
thread_to_global
public long thread_to_global()
Returns the value of thethread_to_globalfield.
-
global_to_thread
public long global_to_thread()
Returns the value of theglobal_to_threadfield.
-
malloc
public static RPmallocThreadStatistics malloc()
Returns a newRPmallocThreadStatisticsinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static RPmallocThreadStatistics calloc()
Returns a newRPmallocThreadStatisticsinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static RPmallocThreadStatistics create()
Returns a newRPmallocThreadStatisticsinstance allocated withBufferUtils.
-
create
public static RPmallocThreadStatistics create(long address)
Returns a newRPmallocThreadStatisticsinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static RPmallocThreadStatistics.Buffer malloc(int capacity)
Returns a newRPmallocThreadStatistics.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static RPmallocThreadStatistics.Buffer calloc(int capacity)
Returns a newRPmallocThreadStatistics.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static RPmallocThreadStatistics.Buffer create(int capacity)
Returns a newRPmallocThreadStatistics.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static RPmallocThreadStatistics.Buffer create(long address, int capacity)
Create aRPmallocThreadStatistics.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static RPmallocThreadStatistics mallocStack()
Returns a newRPmallocThreadStatisticsinstance allocated on the thread-localMemoryStack.
-
callocStack
public static RPmallocThreadStatistics callocStack()
Returns a newRPmallocThreadStatisticsinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static RPmallocThreadStatistics mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocThreadStatisticsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static RPmallocThreadStatistics callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocThreadStatisticsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static RPmallocThreadStatistics.Buffer mallocStack(int capacity)
Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static RPmallocThreadStatistics.Buffer callocStack(int capacity)
Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static RPmallocThreadStatistics.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static RPmallocThreadStatistics.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-