public interface EOS_AllocateMemoryFunc
extends com.sun.jna.Callback
| Modifier and Type | Method and Description |
|---|---|
com.sun.jna.Pointer |
run(NativeSize sizeInBytes,
NativeSize alignment)
Function prototype type definition for functions that allocate memory.
|
com.sun.jna.Pointer run(NativeSize sizeInBytes, NativeSize alignment)
Functions passed to EOS_Initialize to serve as memory allocators should return a pointer to the allocated memory.
The returned pointer should have at least SizeInBytes available capacity and the memory address should be a multiple of Alignment. The SDK will always call the provided function with an Alignment that is a power of 2. Allocation failures should return a null pointer.
sizeInBytes - The size in bytes of the memory block to allocatealignment - The alignment in bytes of the memory block to allocate