Package org.lwjgl.system.rpmalloc
Interface RPMemoryMapCallbackI
-
- All Superinterfaces:
org.lwjgl.system.CallbackI,org.lwjgl.system.Pointer
- All Known Implementing Classes:
RPMemoryMapCallback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface RPMemoryMapCallbackI extends org.lwjgl.system.CallbackIInstances of this interface may be set to theRPMallocConfigstruct.Type
void * (*invoke(long, long)) ( size_t size, size_t *offset )
-
-
Field Summary
Fields Modifier and Type Field Description static org.lwjgl.system.libffi.FFICIFCIF
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidcallback(long ret, long args)default org.lwjgl.system.libffi.FFICIFgetCallInterface()longinvoke(long size, long offset)Map memory pages for the given number of bytes.
-
-
-
Method Detail
-
getCallInterface
default org.lwjgl.system.libffi.FFICIF getCallInterface()
- Specified by:
getCallInterfacein interfaceorg.lwjgl.system.CallbackI
-
callback
default void callback(long ret, long args)- Specified by:
callbackin interfaceorg.lwjgl.system.CallbackI
-
invoke
long invoke(long size, long offset)Map memory pages for the given number of bytes.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_mapfunction, you must also set amemory_unmapfunction or else the default implementation will be used for both.- Parameters:
size- the number of bytes to mapoffset- the alignment offset
-
-