public class NkMemoryStatus
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct nk_memory_status {
void * memory;
unsigned int type;
nk_size size;
nk_size allocated;
nk_size needed;
nk_size calls;
}| Modifier and Type | Class and Description |
|---|---|
static class |
NkMemoryStatus.Buffer
An array of
NkMemoryStatus structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
ALLOCATED
The struct member offsets.
|
static int |
CALLS
The struct member offsets.
|
static int |
MEMORY
The struct member offsets.
|
static int |
NEEDED
The struct member offsets.
|
static int |
SIZE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
TYPE
The struct member offsets.
|
| Constructor and Description |
|---|
NkMemoryStatus(java.nio.ByteBuffer container)
Creates a
NkMemoryStatus instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
long |
allocated()
Returns the value of the
allocated field. |
static NkMemoryStatus |
calloc()
Returns a new
NkMemoryStatus instance allocated with memCalloc. |
static NkMemoryStatus.Buffer |
calloc(int capacity)
Returns a new
NkMemoryStatus.Buffer instance allocated with memCalloc. |
static NkMemoryStatus |
callocStack()
Returns a new
NkMemoryStatus instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkMemoryStatus.Buffer |
callocStack(int capacity)
Returns a new
NkMemoryStatus.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkMemoryStatus.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkMemoryStatus.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkMemoryStatus |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkMemoryStatus instance allocated on the specified MemoryStack and initializes all its bits to zero. |
long |
calls()
Returns the value of the
calls field. |
static NkMemoryStatus |
create()
Returns a new
NkMemoryStatus instance allocated with BufferUtils. |
static NkMemoryStatus.Buffer |
create(int capacity)
Returns a new
NkMemoryStatus.Buffer instance allocated with BufferUtils. |
static NkMemoryStatus |
create(long address)
Returns a new
NkMemoryStatus instance for the specified memory address. |
static NkMemoryStatus.Buffer |
create(long address,
int capacity)
Create a
NkMemoryStatus.Buffer instance at the specified memory. |
static NkMemoryStatus |
createSafe(long address)
|
static NkMemoryStatus.Buffer |
createSafe(long address,
int capacity)
|
static NkMemoryStatus |
malloc()
Returns a new
NkMemoryStatus instance allocated with memAlloc. |
static NkMemoryStatus.Buffer |
malloc(int capacity)
Returns a new
NkMemoryStatus.Buffer instance allocated with memAlloc. |
static NkMemoryStatus |
mallocStack()
Returns a new
NkMemoryStatus instance allocated on the thread-local MemoryStack. |
static NkMemoryStatus.Buffer |
mallocStack(int capacity)
Returns a new
NkMemoryStatus.Buffer instance allocated on the thread-local MemoryStack. |
static NkMemoryStatus.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkMemoryStatus.Buffer instance allocated on the specified MemoryStack. |
static NkMemoryStatus |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkMemoryStatus instance allocated on the specified MemoryStack. |
java.nio.ByteBuffer |
memory()
Returns a
ByteBuffer view of the data pointed to by the memory field. |
static long |
nallocated(long struct)
Unsafe version of
allocated(). |
static long |
ncalls(long struct)
Unsafe version of
calls(). |
long |
needed()
Returns the value of the
needed field. |
static java.nio.ByteBuffer |
nmemory(long struct)
Unsafe version of
memory. |
static long |
nneeded(long struct)
Unsafe version of
needed(). |
static long |
nsize(long struct)
Unsafe version of
size(). |
static int |
ntype(long struct)
Unsafe version of
type(). |
long |
size()
Returns the value of the
size field. |
int |
sizeof() |
int |
type()
Returns the value of the
type field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MEMORY
public static final int TYPE
public static final int SIZE
public static final int ALLOCATED
public static final int NEEDED
public static final int CALLS
public NkMemoryStatus(java.nio.ByteBuffer container)
NkMemoryStatus instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic java.nio.ByteBuffer memory()
ByteBuffer view of the data pointed to by the memory field.public int type()
type field.public long size()
size field.public long allocated()
allocated field.public long needed()
needed field.public long calls()
calls field.public static NkMemoryStatus malloc()
NkMemoryStatus instance allocated with memAlloc. The instance must be explicitly freed.public static NkMemoryStatus calloc()
NkMemoryStatus instance allocated with memCalloc. The instance must be explicitly freed.public static NkMemoryStatus create()
NkMemoryStatus instance allocated with BufferUtils.public static NkMemoryStatus create(long address)
NkMemoryStatus instance for the specified memory address.@Nullable public static NkMemoryStatus createSafe(long address)
public static NkMemoryStatus.Buffer malloc(int capacity)
NkMemoryStatus.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkMemoryStatus.Buffer calloc(int capacity)
NkMemoryStatus.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkMemoryStatus.Buffer create(int capacity)
NkMemoryStatus.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static NkMemoryStatus.Buffer create(long address, int capacity)
NkMemoryStatus.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NkMemoryStatus.Buffer createSafe(long address, int capacity)
public static NkMemoryStatus mallocStack()
NkMemoryStatus instance allocated on the thread-local MemoryStack.public static NkMemoryStatus callocStack()
NkMemoryStatus instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static NkMemoryStatus mallocStack(org.lwjgl.system.MemoryStack stack)
NkMemoryStatus instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static NkMemoryStatus callocStack(org.lwjgl.system.MemoryStack stack)
NkMemoryStatus instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static NkMemoryStatus.Buffer mallocStack(int capacity)
NkMemoryStatus.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static NkMemoryStatus.Buffer callocStack(int capacity)
NkMemoryStatus.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static NkMemoryStatus.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkMemoryStatus.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NkMemoryStatus.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkMemoryStatus.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static java.nio.ByteBuffer nmemory(long struct)
memory.public static int ntype(long struct)
type().public static long nsize(long struct)
size().public static long nallocated(long struct)
allocated().public static long nneeded(long struct)
needed().public static long ncalls(long struct)
calls().Copyright LWJGL. All Rights Reserved. License terms.