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.NativeResourceLayout
struct rpmalloc_thread_statistics_t { size_tsizecache(); size_tspancache(); size_tthread_to_global(); size_tglobal_to_thread(); struct { size_tcurrent; size_tpeak; size_tto_global; size_tfrom_global; size_tto_cache; size_tfrom_cache; size_tto_reserved; size_tfrom_reserved; size_tmap_calls; }span_use[64]; struct { size_talloc_current; size_talloc_peak; size_talloc_total; size_tfree_total; size_tspans_to_cache; size_tspans_from_cache; size_tspans_from_reserved; size_tmap_calls; }size_use[128]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRPmallocThreadStatistics.BufferAn array ofRPmallocThreadStatisticsstructs.static classRPmallocThreadStatistics.size_useLayoutstatic classRPmallocThreadStatistics.span_useLayout
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intGLOBAL_TO_THREAD
SIZE_USE
SIZECACHEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSPAN_USE
SPANCACHE
THREAD_TO_GLOBALThe struct member offsets.
-
Constructor Summary
Constructors Constructor 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 Deprecated Methods Modifier and Type Method Description static RPmallocThreadStatisticscalloc()Returns a newRPmallocThreadStatisticsinstance allocated withmemCalloc.static RPmallocThreadStatistics.Buffercalloc(int capacity)Returns a newRPmallocThreadStatistics.Bufferinstance allocated withmemCalloc.static RPmallocThreadStatistics.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RPmallocThreadStatisticscalloc(org.lwjgl.system.MemoryStack stack)Returns a newRPmallocThreadStatisticsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RPmallocThreadStatisticscallocStack()Deprecated.static RPmallocThreadStatistics.BuffercallocStack(int capacity)Deprecated.static RPmallocThreadStatistics.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static RPmallocThreadStatisticscallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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.static RPmallocThreadStatistics.Buffercreate(long address, int capacity)Create aRPmallocThreadStatistics.Bufferinstance at the specified memory.static RPmallocThreadStatisticscreateSafe(long address)static RPmallocThreadStatistics.BuffercreateSafe(long address, int capacity)longglobal_to_thread()Total number of bytes transitioned from global cache to thread cache (only ifENABLE_STATISTICS=1)static RPmallocThreadStatisticsmalloc()Returns a newRPmallocThreadStatisticsinstance allocated withmemAlloc.static RPmallocThreadStatistics.Buffermalloc(int capacity)Returns a newRPmallocThreadStatistics.Bufferinstance allocated withmemAlloc.static RPmallocThreadStatistics.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the specifiedMemoryStack.static RPmallocThreadStatisticsmalloc(org.lwjgl.system.MemoryStack stack)Returns a newRPmallocThreadStatisticsinstance allocated on the specifiedMemoryStack.static RPmallocThreadStatisticsmallocStack()Deprecated.static RPmallocThreadStatistics.BuffermallocStack(int capacity)Deprecated.static RPmallocThreadStatistics.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static RPmallocThreadStatisticsmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static longnglobal_to_thread(long struct)Unsafe version ofglobal_to_thread().static RPmallocThreadStatistics.size_use.Buffernsize_use(long struct)Unsafe version ofsize_use().static RPmallocThreadStatistics.size_usensize_use(long struct, int index)Unsafe version ofsize_use.static longnsizecache(long struct)Unsafe version ofsizecache().static RPmallocThreadStatistics.span_use.Buffernspan_use(long struct)Unsafe version ofspan_use().static RPmallocThreadStatistics.span_usenspan_use(long struct, int index)Unsafe version ofspan_use.static longnspancache(long struct)Unsafe version ofspancache().static longnthread_to_global(long struct)Unsafe version ofthread_to_global().RPmallocThreadStatistics.size_use.Buffersize_use()Per size class statistics (only ifENABLE_STATISTICS=1)RPmallocThreadStatistics.size_usesize_use(int index)Per size class statistics (only ifENABLE_STATISTICS=1)longsizecache()Current number of bytes available in thread size class caches for small and medium sizes (<32KiB)intsizeof()RPmallocThreadStatistics.span_use.Bufferspan_use()Per span count statistics (only ifENABLE_STATISTICS=1)RPmallocThreadStatistics.span_usespan_use(int index)Per span count statistics (only ifENABLE_STATISTICS=1)longspancache()Current number of bytes available in thread span caches for small and medium sizes (<32KiB)longthread_to_global()Total number of bytes transitioned from thread cache to global cache (only ifENABLE_STATISTICS=1)
-
-
-
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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sizecache
public long sizecache()
Current number of bytes available in thread size class caches for small and medium sizes (<32KiB)
-
spancache
public long spancache()
Current number of bytes available in thread span caches for small and medium sizes (<32KiB)
-
thread_to_global
public long thread_to_global()
Total number of bytes transitioned from thread cache to global cache (only ifENABLE_STATISTICS=1)
-
global_to_thread
public long global_to_thread()
Total number of bytes transitioned from global cache to thread cache (only ifENABLE_STATISTICS=1)
-
span_use
public RPmallocThreadStatistics.span_use.Buffer span_use() public RPmallocThreadStatistics.span_use span_use(int index)
Per span count statistics (only ifENABLE_STATISTICS=1)
-
size_use
public RPmallocThreadStatistics.size_use.Buffer size_use() public RPmallocThreadStatistics.size_use size_use(int index)
Per size class statistics (only ifENABLE_STATISTICS=1)
-
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.
-
createSafe
@Nullable public static RPmallocThreadStatistics createSafe(long address)
-
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
-
createSafe
@Nullable public static RPmallocThreadStatistics.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static RPmallocThreadStatistics mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static RPmallocThreadStatistics callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static RPmallocThreadStatistics mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static RPmallocThreadStatistics callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static RPmallocThreadStatistics.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static RPmallocThreadStatistics.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static RPmallocThreadStatistics.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static RPmallocThreadStatistics.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static RPmallocThreadStatistics malloc(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocThreadStatisticsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static RPmallocThreadStatistics calloc(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
-
malloc
public static RPmallocThreadStatistics.Buffer malloc(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
-
calloc
public static RPmallocThreadStatistics.Buffer calloc(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
-
nsizecache
public static long nsizecache(long struct)
Unsafe version ofsizecache().
-
nspancache
public static long nspancache(long struct)
Unsafe version ofspancache().
-
nthread_to_global
public static long nthread_to_global(long struct)
Unsafe version ofthread_to_global().
-
nglobal_to_thread
public static long nglobal_to_thread(long struct)
Unsafe version ofglobal_to_thread().
-
nspan_use
public static RPmallocThreadStatistics.span_use.Buffer nspan_use(long struct)
Unsafe version ofspan_use().
-
nspan_use
public static RPmallocThreadStatistics.span_use nspan_use(long struct, int index)
Unsafe version ofspan_use.
-
nsize_use
public static RPmallocThreadStatistics.size_use.Buffer nsize_use(long struct)
Unsafe version ofsize_use().
-
nsize_use
public static RPmallocThreadStatistics.size_use nsize_use(long struct, int index)
Unsafe version ofsize_use.
-
-