@FunctionalInterface
public interface RPMemoryMapCallbackI
extends org.lwjgl.system.CallbackI.P
RPMallocConfig struct.
void * (*) (
size_t size,
size_t *offset
)org.lwjgl.system.CallbackI.B, org.lwjgl.system.CallbackI.D, org.lwjgl.system.CallbackI.F, org.lwjgl.system.CallbackI.I, org.lwjgl.system.CallbackI.J, org.lwjgl.system.CallbackI.N, org.lwjgl.system.CallbackI.P, org.lwjgl.system.CallbackI.S, org.lwjgl.system.CallbackI.V, org.lwjgl.system.CallbackI.Z| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SIGNATURE |
| Modifier and Type | Method and Description |
|---|---|
default long |
callback(long args) |
default java.lang.String |
getSignature() |
long |
invoke(long size,
long offset)
Map memory pages for the given number of bytes.
|
static final java.lang.String SIGNATURE
default java.lang.String getSignature()
getSignature in interface org.lwjgl.system.CallbackIdefault long callback(long args)
callback in interface org.lwjgl.system.CallbackI.Plong invoke(long size,
long offset)
The returned address MUST be aligned to the rpmalloc span size, which will always be a power of two. Optionally the function can store an alignment
offset in the offset variable in case it performs alignment and the returned pointer is offset from the actual start of the memory region due to this
alignment. The alignment offset will be passed to the memory unmap function. The alignment offset MUST NOT be larger than 65535 (storable in an
uint16_t), if it is you must use natural alignment to shift it into 16 bits.
If you set a memory_map function, you must also set a memory_unmap function or else the default implementation will be used for
both.
size - the number of bytes to mapoffset - the alignment offsetCopyright LWJGL. All Rights Reserved. License terms.