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.NativeResource
Member documentation
sizecache
– Current number of bytes available in thread size class caches for small and medium sizes (<32KiB)spancache
– Current number of bytes available in thread span caches for small and medium sizes (<32KiB)thread_to_global
– Total number of bytes transitioned from thread cache to global cache (only ifENABLE_STATISTICS=1
)global_to_thread
– Total number of bytes transitioned from global cache to thread cache (only ifENABLE_STATISTICS=1
)span_use[32]
– Per span count statistics (only ifENABLE_STATISTICS=1
)size_use[128]
– Per size class statistics (only ifENABLE_STATISTICS=1
)
Layout
struct rpmalloc_thread_statistics_t { size_t sizecache; size_t spancache; size_t thread_to_global; size_t global_to_thread; struct { size_t current; size_t peak; size_t to_global; size_t from_global; size_t to_cache; size_t from_cache; size_t to_reserved; size_t from_reserved; size_t map_calls; }
span_use
[32]; struct { size_t alloc_current; size_t alloc_peak; size_t alloc_total; size_t free_total; size_t spans_to_cache; size_t spans_from_cache; size_t spans_from_reserved; size_t map_calls; }size_use
[128]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RPmallocThreadStatistics.Buffer
An array ofRPmallocThreadStatistics
structs.static class
RPmallocThreadStatistics.size_use
Member documentationstatic class
RPmallocThreadStatistics.span_use
Member documentation
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
GLOBAL_TO_THREAD
SIZE_USE
SIZECACHEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
SPAN_USE
SPANCACHE
THREAD_TO_GLOBALThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description RPmallocThreadStatistics(java.nio.ByteBuffer container)
Creates aRPmallocThreadStatistics
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RPmallocThreadStatistics
calloc()
Returns a newRPmallocThreadStatistics
instance allocated withmemCalloc
.static RPmallocThreadStatistics.Buffer
calloc(int capacity)
Returns a newRPmallocThreadStatistics.Buffer
instance allocated withmemCalloc
.static RPmallocThreadStatistics
callocStack()
Returns a newRPmallocThreadStatistics
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static RPmallocThreadStatistics.Buffer
callocStack(int capacity)
Returns a newRPmallocThreadStatistics.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static RPmallocThreadStatistics.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocThreadStatistics.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static RPmallocThreadStatistics
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocThreadStatistics
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static RPmallocThreadStatistics
create()
Returns a newRPmallocThreadStatistics
instance allocated withBufferUtils
.static RPmallocThreadStatistics.Buffer
create(int capacity)
Returns a newRPmallocThreadStatistics.Buffer
instance allocated withBufferUtils
.static RPmallocThreadStatistics
create(long address)
Returns a newRPmallocThreadStatistics
instance for the specified memory address.static RPmallocThreadStatistics.Buffer
create(long address, int capacity)
Create aRPmallocThreadStatistics.Buffer
instance at the specified memory.static RPmallocThreadStatistics
createSafe(long address)
static RPmallocThreadStatistics.Buffer
createSafe(long address, int capacity)
long
global_to_thread()
Returns the value of theglobal_to_thread
field.static RPmallocThreadStatistics
malloc()
Returns a newRPmallocThreadStatistics
instance allocated withmemAlloc
.static RPmallocThreadStatistics.Buffer
malloc(int capacity)
Returns a newRPmallocThreadStatistics.Buffer
instance allocated withmemAlloc
.static RPmallocThreadStatistics
mallocStack()
Returns a newRPmallocThreadStatistics
instance allocated on the thread-localMemoryStack
.static RPmallocThreadStatistics.Buffer
mallocStack(int capacity)
Returns a newRPmallocThreadStatistics.Buffer
instance allocated on the thread-localMemoryStack
.static RPmallocThreadStatistics.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocThreadStatistics.Buffer
instance allocated on the specifiedMemoryStack
.static RPmallocThreadStatistics
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocThreadStatistics
instance allocated on the specifiedMemoryStack
.static long
nglobal_to_thread(long struct)
Unsafe version ofglobal_to_thread()
.static RPmallocThreadStatistics.size_use.Buffer
nsize_use(long struct)
Unsafe version ofsize_use()
.static RPmallocThreadStatistics.size_use
nsize_use(long struct, int index)
Unsafe version ofsize_use
.static long
nsizecache(long struct)
Unsafe version ofsizecache()
.static RPmallocThreadStatistics.span_use.Buffer
nspan_use(long struct)
Unsafe version ofspan_use()
.static RPmallocThreadStatistics.span_use
nspan_use(long struct, int index)
Unsafe version ofspan_use
.static long
nspancache(long struct)
Unsafe version ofspancache()
.static long
nthread_to_global(long struct)
Unsafe version ofthread_to_global()
.RPmallocThreadStatistics.size_use.Buffer
size_use()
Returns aRPmallocThreadStatistics.size_use
.Buffer view of thesize_use
field.RPmallocThreadStatistics.size_use
size_use(int index)
Returns aRPmallocThreadStatistics.size_use
view of the struct at the specified index of thesize_use
field.long
sizecache()
Returns the value of thesizecache
field.int
sizeof()
RPmallocThreadStatistics.span_use.Buffer
span_use()
Returns aRPmallocThreadStatistics.span_use
.Buffer view of thespan_use
field.RPmallocThreadStatistics.span_use
span_use(int index)
Returns aRPmallocThreadStatistics.span_use
view of the struct at the specified index of thespan_use
field.long
spancache()
Returns the value of thespancache
field.long
thread_to_global()
Returns the value of thethread_to_global
field.
-
-
-
Constructor Detail
-
RPmallocThreadStatistics
public RPmallocThreadStatistics(java.nio.ByteBuffer container)
Creates aRPmallocThreadStatistics
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
sizecache
public long sizecache()
Returns the value of thesizecache
field.
-
spancache
public long spancache()
Returns the value of thespancache
field.
-
thread_to_global
public long thread_to_global()
Returns the value of thethread_to_global
field.
-
global_to_thread
public long global_to_thread()
Returns the value of theglobal_to_thread
field.
-
span_use
public RPmallocThreadStatistics.span_use.Buffer span_use()
Returns aRPmallocThreadStatistics.span_use
.Buffer view of thespan_use
field.
-
span_use
public RPmallocThreadStatistics.span_use span_use(int index)
Returns aRPmallocThreadStatistics.span_use
view of the struct at the specified index of thespan_use
field.
-
size_use
public RPmallocThreadStatistics.size_use.Buffer size_use()
Returns aRPmallocThreadStatistics.size_use
.Buffer view of thesize_use
field.
-
size_use
public RPmallocThreadStatistics.size_use size_use(int index)
Returns aRPmallocThreadStatistics.size_use
view of the struct at the specified index of thesize_use
field.
-
malloc
public static RPmallocThreadStatistics malloc()
Returns a newRPmallocThreadStatistics
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static RPmallocThreadStatistics calloc()
Returns a newRPmallocThreadStatistics
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static RPmallocThreadStatistics create()
Returns a newRPmallocThreadStatistics
instance allocated withBufferUtils
.
-
create
public static RPmallocThreadStatistics create(long address)
Returns a newRPmallocThreadStatistics
instance for the specified memory address.
-
createSafe
@Nullable public static RPmallocThreadStatistics createSafe(long address)
-
malloc
public static RPmallocThreadStatistics.Buffer malloc(int capacity)
Returns a newRPmallocThreadStatistics.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static RPmallocThreadStatistics.Buffer calloc(int capacity)
Returns a newRPmallocThreadStatistics.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static RPmallocThreadStatistics.Buffer create(int capacity)
Returns a newRPmallocThreadStatistics.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static RPmallocThreadStatistics.Buffer create(long address, int capacity)
Create aRPmallocThreadStatistics.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static RPmallocThreadStatistics.Buffer createSafe(long address, int capacity)
-
mallocStack
public static RPmallocThreadStatistics mallocStack()
Returns a newRPmallocThreadStatistics
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static RPmallocThreadStatistics callocStack()
Returns a newRPmallocThreadStatistics
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static RPmallocThreadStatistics mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocThreadStatistics
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static RPmallocThreadStatistics callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocThreadStatistics
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static RPmallocThreadStatistics.Buffer callocStack(int capacity)
Returns a newRPmallocThreadStatistics.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-
-