Package org.lwjgl.system.rpmalloc
Class RPmallocGlobalStatistics
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.rpmalloc.RPmallocGlobalStatistics
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class RPmallocGlobalStatistics extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Member documentation
mapped
– Current amount of virtual memory mapped, all of which might not have been committed (only ifENABLE_STATISTICS=1
)mapped_peak
– Peak amount of virtual memory mapped, all of which might not have been committed (only ifENABLE_STATISTICS=1
)cached
– Current amount of memory in global caches for small and medium sizes (<32KiB)huge_alloc
– Current amount of memory allocated in huge allocations, i.e larger thanLARGE_SIZE_LIMIT
which is 2MiB by default (only ifENABLE_STATISTICS=1
)huge_alloc_peak
– Peak amount of memory allocated in huge allocations, i.e larger thanLARGE_SIZE_LIMIT
which is 2MiB by default (only ifENABLE_STATISTICS=1
)mapped_total
– Total amount of memory mapped since initialization (only ifENABLE_STATISTICS=1
)unmapped_total
– Total amount of memory unmapped since initialization (only ifENABLE_STATISTICS=1
)
Layout
struct rpmalloc_global_statistics_t { size_t mapped; size_t mapped_peak; size_t cached; size_t huge_alloc; size_t huge_alloc_peak; size_t mapped_total; size_t unmapped_total; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RPmallocGlobalStatistics.Buffer
An array ofRPmallocGlobalStatistics
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CACHED
HUGE_ALLOC
HUGE_ALLOC_PEAK
MAPPED
MAPPED_PEAK
MAPPED_TOTALThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
UNMAPPED_TOTAL
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description RPmallocGlobalStatistics(java.nio.ByteBuffer container)
Creates aRPmallocGlobalStatistics
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
cached()
Returns the value of thecached
field.static RPmallocGlobalStatistics
calloc()
Returns a newRPmallocGlobalStatistics
instance allocated withmemCalloc
.static RPmallocGlobalStatistics.Buffer
calloc(int capacity)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated withmemCalloc
.static RPmallocGlobalStatistics
callocStack()
Returns a newRPmallocGlobalStatistics
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static RPmallocGlobalStatistics.Buffer
callocStack(int capacity)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static RPmallocGlobalStatistics.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static RPmallocGlobalStatistics
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatistics
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static RPmallocGlobalStatistics
create()
Returns a newRPmallocGlobalStatistics
instance allocated withBufferUtils
.static RPmallocGlobalStatistics.Buffer
create(int capacity)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated withBufferUtils
.static RPmallocGlobalStatistics
create(long address)
Returns a newRPmallocGlobalStatistics
instance for the specified memory address.static RPmallocGlobalStatistics.Buffer
create(long address, int capacity)
Create aRPmallocGlobalStatistics.Buffer
instance at the specified memory.static RPmallocGlobalStatistics
createSafe(long address)
static RPmallocGlobalStatistics.Buffer
createSafe(long address, int capacity)
long
huge_alloc()
Returns the value of thehuge_alloc
field.long
huge_alloc_peak()
Returns the value of thehuge_alloc_peak
field.static RPmallocGlobalStatistics
malloc()
Returns a newRPmallocGlobalStatistics
instance allocated withmemAlloc
.static RPmallocGlobalStatistics.Buffer
malloc(int capacity)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated withmemAlloc
.static RPmallocGlobalStatistics
mallocStack()
Returns a newRPmallocGlobalStatistics
instance allocated on the thread-localMemoryStack
.static RPmallocGlobalStatistics.Buffer
mallocStack(int capacity)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated on the thread-localMemoryStack
.static RPmallocGlobalStatistics.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated on the specifiedMemoryStack
.static RPmallocGlobalStatistics
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatistics
instance allocated on the specifiedMemoryStack
.long
mapped()
Returns the value of themapped
field.long
mapped_peak()
Returns the value of themapped_peak
field.long
mapped_total()
Returns the value of themapped_total
field.static long
ncached(long struct)
Unsafe version ofcached()
.static long
nhuge_alloc(long struct)
Unsafe version ofhuge_alloc()
.static long
nhuge_alloc_peak(long struct)
Unsafe version ofhuge_alloc_peak()
.static long
nmapped(long struct)
Unsafe version ofmapped()
.static long
nmapped_peak(long struct)
Unsafe version ofmapped_peak()
.static long
nmapped_total(long struct)
Unsafe version ofmapped_total()
.static long
nunmapped_total(long struct)
Unsafe version ofunmapped_total()
.int
sizeof()
long
unmapped_total()
Returns the value of theunmapped_total
field.
-
-
-
Constructor Detail
-
RPmallocGlobalStatistics
public RPmallocGlobalStatistics(java.nio.ByteBuffer container)
Creates aRPmallocGlobalStatistics
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
-
mapped
public long mapped()
Returns the value of themapped
field.
-
mapped_peak
public long mapped_peak()
Returns the value of themapped_peak
field.
-
cached
public long cached()
Returns the value of thecached
field.
-
huge_alloc
public long huge_alloc()
Returns the value of thehuge_alloc
field.
-
huge_alloc_peak
public long huge_alloc_peak()
Returns the value of thehuge_alloc_peak
field.
-
mapped_total
public long mapped_total()
Returns the value of themapped_total
field.
-
unmapped_total
public long unmapped_total()
Returns the value of theunmapped_total
field.
-
malloc
public static RPmallocGlobalStatistics malloc()
Returns a newRPmallocGlobalStatistics
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static RPmallocGlobalStatistics calloc()
Returns a newRPmallocGlobalStatistics
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static RPmallocGlobalStatistics create()
Returns a newRPmallocGlobalStatistics
instance allocated withBufferUtils
.
-
create
public static RPmallocGlobalStatistics create(long address)
Returns a newRPmallocGlobalStatistics
instance for the specified memory address.
-
createSafe
@Nullable public static RPmallocGlobalStatistics createSafe(long address)
-
malloc
public static RPmallocGlobalStatistics.Buffer malloc(int capacity)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static RPmallocGlobalStatistics.Buffer calloc(int capacity)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static RPmallocGlobalStatistics.Buffer create(int capacity)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static RPmallocGlobalStatistics.Buffer create(long address, int capacity)
Create aRPmallocGlobalStatistics.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static RPmallocGlobalStatistics.Buffer createSafe(long address, int capacity)
-
mallocStack
public static RPmallocGlobalStatistics mallocStack()
Returns a newRPmallocGlobalStatistics
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static RPmallocGlobalStatistics callocStack()
Returns a newRPmallocGlobalStatistics
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static RPmallocGlobalStatistics mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatistics
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static RPmallocGlobalStatistics callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatistics
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static RPmallocGlobalStatistics.Buffer mallocStack(int capacity)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static RPmallocGlobalStatistics.Buffer callocStack(int capacity)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static RPmallocGlobalStatistics.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static RPmallocGlobalStatistics.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRPmallocGlobalStatistics.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nmapped
public static long nmapped(long struct)
Unsafe version ofmapped()
.
-
nmapped_peak
public static long nmapped_peak(long struct)
Unsafe version ofmapped_peak()
.
-
ncached
public static long ncached(long struct)
Unsafe version ofcached()
.
-
nhuge_alloc
public static long nhuge_alloc(long struct)
Unsafe version ofhuge_alloc()
.
-
nhuge_alloc_peak
public static long nhuge_alloc_peak(long struct)
Unsafe version ofhuge_alloc_peak()
.
-
nmapped_total
public static long nmapped_total(long struct)
Unsafe version ofmapped_total()
.
-
nunmapped_total
public static long nunmapped_total(long struct)
Unsafe version ofunmapped_total()
.
-
-