Package org.lwjgl.system.rpmalloc
Class RPmallocThreadStatistics
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<RPmallocThreadStatistics>
org.lwjgl.system.rpmalloc.RPmallocThreadStatistics
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
public class RPmallocThreadStatistics
extends Struct<RPmallocThreadStatistics>
implements NativeResource
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;
} {@link span_use span_use}[64];
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;
} {@link size_use size_use}[128];
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An array ofRPmallocThreadStatistics
structs.static class
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; }
static class
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; }
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionRPmallocThreadStatistics
(ByteBuffer container) Creates aRPmallocThreadStatistics
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic RPmallocThreadStatistics
calloc()
Returns a newRPmallocThreadStatistics
instance allocated withmemCalloc
.calloc
(int capacity) Returns a newRPmallocThreadStatistics.Buffer
instance allocated withmemCalloc
.calloc
(int capacity, MemoryStack stack) Returns a newRPmallocThreadStatistics.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static RPmallocThreadStatistics
calloc
(MemoryStack stack) Returns a newRPmallocThreadStatistics
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static RPmallocThreadStatistics
Deprecated.callocStack
(int capacity) Deprecated.callocStack
(int capacity, MemoryStack stack) Deprecated.static RPmallocThreadStatistics
callocStack
(MemoryStack stack) Deprecated.static RPmallocThreadStatistics
create()
Returns a newRPmallocThreadStatistics
instance allocated withBufferUtils
.create
(int capacity) Returns a newRPmallocThreadStatistics.Buffer
instance allocated withBufferUtils
.static RPmallocThreadStatistics
create
(long address) Returns a newRPmallocThreadStatistics
instance for the specified memory address.create
(long address, int capacity) Create aRPmallocThreadStatistics.Buffer
instance at the specified memory.static @Nullable RPmallocThreadStatistics
createSafe
(long address) static @Nullable RPmallocThreadStatistics.Buffer
createSafe
(long address, int capacity) long
static RPmallocThreadStatistics
malloc()
Returns a newRPmallocThreadStatistics
instance allocated withmemAlloc
.malloc
(int capacity) Returns a newRPmallocThreadStatistics.Buffer
instance allocated withmemAlloc
.malloc
(int capacity, MemoryStack stack) Returns a newRPmallocThreadStatistics.Buffer
instance allocated on the specifiedMemoryStack
.static RPmallocThreadStatistics
malloc
(MemoryStack stack) Returns a newRPmallocThreadStatistics
instance allocated on the specifiedMemoryStack
.static RPmallocThreadStatistics
Deprecated.mallocStack
(int capacity) Deprecated.mallocStack
(int capacity, MemoryStack stack) Deprecated.static RPmallocThreadStatistics
mallocStack
(MemoryStack stack) Deprecated.static long
nglobal_to_thread
(long struct) Unsafe version ofglobal_to_thread()
.nsize_use
(long struct) Unsafe version ofsize_use()
.nsize_use
(long struct, int index) Unsafe version ofsize_use
.static long
nsizecache
(long struct) Unsafe version ofsizecache()
.nspan_use
(long struct) Unsafe version ofspan_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()
.size_use()
size_use
(int index) long
int
sizeof()
Returnssizeof(struct)
.span_use()
span_use
(int index) long
long
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
SIZECACHE
public static final int SIZECACHEThe struct member offsets. -
SPANCACHE
public static final int SPANCACHEThe struct member offsets. -
THREAD_TO_GLOBAL
public static final int THREAD_TO_GLOBALThe struct member offsets. -
GLOBAL_TO_THREAD
public static final int GLOBAL_TO_THREADThe struct member offsets. -
SPAN_USE
public static final int SPAN_USEThe struct member offsets. -
SIZE_USE
public static final int SIZE_USEThe struct member offsets.
-
-
Constructor Details
-
RPmallocThreadStatistics
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<RPmallocThreadStatistics>
-
sizecache
public long sizecache()- Returns:
- the value of the
sizecache
field.
-
spancache
public long spancache()- Returns:
- the value of the
spancache
field.
-
thread_to_global
public long thread_to_global()- Returns:
- the value of the
thread_to_global
field.
-
global_to_thread
public long global_to_thread()- Returns:
- the value of the
global_to_thread
field.
-
span_use
- Returns:
- a
RPmallocThreadStatistics.span_use
.Buffer view of thespan_use
field.
-
span_use
- Returns:
- a
RPmallocThreadStatistics.span_use
view of the struct at the specified index of thespan_use
field.
-
size_use
- Returns:
- a
RPmallocThreadStatistics.size_use
.Buffer view of thesize_use
field.
-
size_use
- Returns:
- a
RPmallocThreadStatistics.size_use
view of the struct at the specified index of thesize_use
field.
-
malloc
Returns a newRPmallocThreadStatistics
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newRPmallocThreadStatistics
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newRPmallocThreadStatistics
instance allocated withBufferUtils
. -
create
Returns a newRPmallocThreadStatistics
instance for the specified memory address. -
createSafe
-
malloc
Returns a newRPmallocThreadStatistics.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newRPmallocThreadStatistics.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newRPmallocThreadStatistics.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aRPmallocThreadStatistics.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
@Deprecated public static RPmallocThreadStatistics.Buffer mallocStack(int capacity, MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
@Deprecated public static RPmallocThreadStatistics.Buffer callocStack(int capacity, MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newRPmallocThreadStatistics
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newRPmallocThreadStatistics
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newRPmallocThreadStatistics.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newRPmallocThreadStatistics.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
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
Unsafe version ofspan_use()
. -
nspan_use
Unsafe version ofspan_use
. -
nsize_use
Unsafe version ofsize_use()
. -
nsize_use
Unsafe version ofsize_use
.
-