public interface EOS_ReallocateMemoryFunc
extends com.sun.jna.Callback
| Modifier and Type | Method and Description |
|---|---|
com.sun.jna.Pointer |
run(com.sun.jna.Pointer pointer,
NativeSize sizeInBytes,
NativeSize alignment)
Function prototype type definition for functions that reallocate memory.
|
com.sun.jna.Pointer run(com.sun.jna.Pointer pointer,
NativeSize sizeInBytes,
NativeSize alignment)
Functions passed to EOS_Initialize to serve as memory reallocators should return a pointer to the reallocated 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. Reallocation failures should return a null pointer.
pointer - A pointer to the existing memory block to reallocate. This pointer may be null, in which case the function should behave like an allocation function.sizeInBytes - The size in bytes of the memoryblock to allocatealignment - The alignment in bytes of the memory blockto allocate