This is the function pointer type for memory reallocation callbacks. A memory reallocation callback function has the following signature:
void* function_name(void* block, size_t size, void* user)
This function must return a memory block at least size bytes long, or NULL if allocation failed. Note that not all parts of GLFW handle
allocation failures gracefully yet.
This function may be called during Init but before the library is flagged as initialized, as well as during Terminate after the library is no
longer flagged as initialized.
Any memory allocated by this function will be deallocated during library termination or earlier.
The block address will never be NULL and the size will always be greater than zero. Reallocations of a block to size zero are converted into
deallocations. Reallocations of NULL to a non-zero size are converted into regular allocations.
void * (*invoke) (
void *block,
size_t size,
void *user
)
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| protected | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static GLFWReallocateCallback | Returns: the newGLFWReallocateCallbackCreates a |
| public static GLFWReallocateCallback | create(GLFWReallocateCallbackI instance)
Creates a |
| public static GLFWReallocateCallback |
| GLFWReallocateCallback | back to summary |
|---|---|
| protected GLFWReallocateCallback() | |
| GLFWReallocateCallback | back to summary |
|---|---|
| pack-priv GLFWReallocateCallback(long functionPointer) | |
| create | back to summary |
|---|---|
| public static GLFWReallocateCallback create(long functionPointer) Creates a
| |
| create | back to summary |
|---|---|
| public static GLFWReallocateCallback create(GLFWReallocateCallbackI instance) Creates a | |
| createSafe | back to summary |
|---|---|
| public static GLFWReallocateCallback createSafe(long functionPointer) Like
| |
| Modifier and Type | Field and Description |
|---|---|
| private final GLFWReallocateCallbackI |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | invoke(long
the address of the memory block to reallocate block, long the new minimum size, in bytes, of the memory block size, long the user-defined pointer from the allocator user)Implements org. |
| delegate | back to summary |
|---|---|
| private final GLFWReallocateCallbackI delegate | |
| Container | back to summary |
|---|---|
| pack-priv Container(long functionPointer, GLFWReallocateCallbackI delegate) | |
| invoke | back to summary |
|---|---|
| public long invoke(long block, long size, long user) Implements org. Doc from org. Will be called for memory reallocation requests.
| |