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;
} 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;
} size_use[128];
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofRPmallocThreadStatisticsstructs.static classstruct { 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 classstruct { 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.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe 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 aRPmallocThreadStatisticsinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic RPmallocThreadStatisticscalloc()Returns a newRPmallocThreadStatisticsinstance allocated withmemCalloc.calloc(int capacity) Returns a newRPmallocThreadStatistics.Bufferinstance allocated withmemCalloc.calloc(int capacity, MemoryStack stack) Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RPmallocThreadStatisticscalloc(MemoryStack stack) Returns a newRPmallocThreadStatisticsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RPmallocThreadStatisticscreate()Returns a newRPmallocThreadStatisticsinstance allocated withBufferUtils.create(int capacity) Returns a newRPmallocThreadStatistics.Bufferinstance allocated withBufferUtils.static RPmallocThreadStatisticscreate(long address) Returns a newRPmallocThreadStatisticsinstance for the specified memory address.create(long address, int capacity) Create aRPmallocThreadStatistics.Bufferinstance at the specified memory.static @Nullable RPmallocThreadStatisticscreateSafe(long address) static @Nullable RPmallocThreadStatistics.BuffercreateSafe(long address, int capacity) longstatic RPmallocThreadStatisticsmalloc()Returns a newRPmallocThreadStatisticsinstance allocated withmemAlloc.malloc(int capacity) Returns a newRPmallocThreadStatistics.Bufferinstance allocated withmemAlloc.malloc(int capacity, MemoryStack stack) Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the specifiedMemoryStack.static RPmallocThreadStatisticsmalloc(MemoryStack stack) Returns a newRPmallocThreadStatisticsinstance allocated on the specifiedMemoryStack.static longnglobal_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 longnsizecache(long struct) Unsafe version ofsizecache().nspan_use(long struct) Unsafe version ofspan_use().nspan_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().size_use()size_use(int index) longintsizeof()Returnssizeof(struct).span_use()span_use(int index) longlongMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<RPmallocThreadStatistics>
-
sizecache
public long sizecache()- Returns:
- the value of the
sizecachefield.
-
spancache
public long spancache()- Returns:
- the value of the
spancachefield.
-
thread_to_global
public long thread_to_global()- Returns:
- the value of the
thread_to_globalfield.
-
global_to_thread
public long global_to_thread()- Returns:
- the value of the
global_to_threadfield.
-
span_use
- Returns:
- a
RPmallocThreadStatistics.span_use.Buffer view of thespan_usefield.
-
span_use
- Returns:
- a
RPmallocThreadStatistics.span_useview of the struct at the specified index of thespan_usefield.
-
size_use
- Returns:
- a
RPmallocThreadStatistics.size_use.Buffer view of thesize_usefield.
-
size_use
- Returns:
- a
RPmallocThreadStatistics.size_useview of the struct at the specified index of thesize_usefield.
-
malloc
Returns a newRPmallocThreadStatisticsinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newRPmallocThreadStatisticsinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newRPmallocThreadStatisticsinstance allocated withBufferUtils. -
create
Returns a newRPmallocThreadStatisticsinstance for the specified memory address. -
createSafe
-
malloc
Returns a newRPmallocThreadStatistics.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newRPmallocThreadStatistics.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newRPmallocThreadStatistics.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aRPmallocThreadStatistics.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newRPmallocThreadStatisticsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newRPmallocThreadStatisticsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newRPmallocThreadStatistics.Bufferinstance allocated on the specifiedMemoryStackand 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.
-