public class ZSTDCustomMem
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct ZSTD_customMem {
ZSTD_allocFunction customAlloc;
ZSTD_freeFunction customFree;
void * opaque;
}| Modifier and Type | Class and Description |
|---|---|
static class |
ZSTDCustomMem.Buffer
An array of
ZSTDCustomMem structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
CUSTOMALLOC
The struct member offsets.
|
static int |
CUSTOMFREE
The struct member offsets.
|
static int |
OPAQUE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
ZSTDCustomMem(java.nio.ByteBuffer container)
Creates a
ZSTDCustomMem instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static ZSTDCustomMem |
calloc()
Returns a new
ZSTDCustomMem instance allocated with memCalloc. |
static ZSTDCustomMem.Buffer |
calloc(int capacity)
Returns a new
ZSTDCustomMem.Buffer instance allocated with memCalloc. |
static ZSTDCustomMem |
callocStack()
Returns a new
ZSTDCustomMem instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static ZSTDCustomMem.Buffer |
callocStack(int capacity)
Returns a new
ZSTDCustomMem.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static ZSTDCustomMem.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
ZSTDCustomMem.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static ZSTDCustomMem |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
ZSTDCustomMem instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static ZSTDCustomMem |
create()
Returns a new
ZSTDCustomMem instance allocated with BufferUtils. |
static ZSTDCustomMem.Buffer |
create(int capacity)
Returns a new
ZSTDCustomMem.Buffer instance allocated with BufferUtils. |
static ZSTDCustomMem |
create(long address)
Returns a new
ZSTDCustomMem instance for the specified memory address. |
static ZSTDCustomMem.Buffer |
create(long address,
int capacity)
Create a
ZSTDCustomMem.Buffer instance at the specified memory. |
static ZSTDCustomMem |
createSafe(long address)
|
static ZSTDCustomMem.Buffer |
createSafe(long address,
int capacity)
|
ZSTDAllocFunction |
customAlloc()
Returns the value of the
customAlloc field. |
ZSTDCustomMem |
customAlloc(ZSTDAllocFunctionI value)
Sets the specified value to the
customAlloc field. |
ZSTDFreeFunction |
customFree()
Returns the value of the
customFree field. |
ZSTDCustomMem |
customFree(ZSTDFreeFunctionI value)
Sets the specified value to the
customFree field. |
static ZSTDCustomMem |
malloc()
Returns a new
ZSTDCustomMem instance allocated with memAlloc. |
static ZSTDCustomMem.Buffer |
malloc(int capacity)
Returns a new
ZSTDCustomMem.Buffer instance allocated with memAlloc. |
static ZSTDCustomMem |
mallocStack()
Returns a new
ZSTDCustomMem instance allocated on the thread-local MemoryStack. |
static ZSTDCustomMem.Buffer |
mallocStack(int capacity)
Returns a new
ZSTDCustomMem.Buffer instance allocated on the thread-local MemoryStack. |
static ZSTDCustomMem.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
ZSTDCustomMem.Buffer instance allocated on the specified MemoryStack. |
static ZSTDCustomMem |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
ZSTDCustomMem instance allocated on the specified MemoryStack. |
static ZSTDAllocFunction |
ncustomAlloc(long struct)
Unsafe version of
customAlloc(). |
static void |
ncustomAlloc(long struct,
ZSTDAllocFunctionI value)
Unsafe version of
customAlloc. |
static ZSTDFreeFunction |
ncustomFree(long struct)
Unsafe version of
customFree(). |
static void |
ncustomFree(long struct,
ZSTDFreeFunctionI value)
Unsafe version of
customFree. |
static long |
nopaque(long struct)
Unsafe version of
opaque(). |
static void |
nopaque(long struct,
long value)
Unsafe version of
opaque. |
long |
opaque()
Returns the value of the
opaque field. |
ZSTDCustomMem |
opaque(long value)
Sets the specified value to the
opaque field. |
ZSTDCustomMem |
set(ZSTDAllocFunctionI customAlloc,
ZSTDFreeFunctionI customFree,
long opaque)
Initializes this struct with the specified values.
|
ZSTDCustomMem |
set(ZSTDCustomMem src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int CUSTOMALLOC
public static final int CUSTOMFREE
public static final int OPAQUE
public ZSTDCustomMem(java.nio.ByteBuffer container)
ZSTDCustomMem 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 ZSTDAllocFunction customAlloc()
customAlloc field.public ZSTDFreeFunction customFree()
customFree field.public long opaque()
opaque field.public ZSTDCustomMem customAlloc(ZSTDAllocFunctionI value)
customAlloc field.public ZSTDCustomMem customFree(ZSTDFreeFunctionI value)
customFree field.public ZSTDCustomMem opaque(long value)
opaque field.public ZSTDCustomMem set(ZSTDAllocFunctionI customAlloc, ZSTDFreeFunctionI customFree, long opaque)
public ZSTDCustomMem set(ZSTDCustomMem src)
src - the source structpublic static ZSTDCustomMem malloc()
ZSTDCustomMem instance allocated with memAlloc. The instance must be explicitly freed.public static ZSTDCustomMem calloc()
ZSTDCustomMem instance allocated with memCalloc. The instance must be explicitly freed.public static ZSTDCustomMem create()
ZSTDCustomMem instance allocated with BufferUtils.public static ZSTDCustomMem create(long address)
ZSTDCustomMem instance for the specified memory address.@Nullable public static ZSTDCustomMem createSafe(long address)
public static ZSTDCustomMem.Buffer malloc(int capacity)
ZSTDCustomMem.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static ZSTDCustomMem.Buffer calloc(int capacity)
ZSTDCustomMem.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static ZSTDCustomMem.Buffer create(int capacity)
ZSTDCustomMem.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static ZSTDCustomMem.Buffer create(long address, int capacity)
ZSTDCustomMem.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static ZSTDCustomMem.Buffer createSafe(long address, int capacity)
public static ZSTDCustomMem mallocStack()
ZSTDCustomMem instance allocated on the thread-local MemoryStack.public static ZSTDCustomMem callocStack()
ZSTDCustomMem instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static ZSTDCustomMem mallocStack(org.lwjgl.system.MemoryStack stack)
ZSTDCustomMem instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static ZSTDCustomMem callocStack(org.lwjgl.system.MemoryStack stack)
ZSTDCustomMem instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static ZSTDCustomMem.Buffer mallocStack(int capacity)
ZSTDCustomMem.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static ZSTDCustomMem.Buffer callocStack(int capacity)
ZSTDCustomMem.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static ZSTDCustomMem.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
ZSTDCustomMem.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static ZSTDCustomMem.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
ZSTDCustomMem.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 ZSTDAllocFunction ncustomAlloc(long struct)
customAlloc().public static ZSTDFreeFunction ncustomFree(long struct)
customFree().public static long nopaque(long struct)
opaque().public static void ncustomAlloc(long struct,
ZSTDAllocFunctionI value)
customAlloc.public static void ncustomFree(long struct,
ZSTDFreeFunctionI value)
customFree.public static void nopaque(long struct,
long value)
opaque.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.