1.2.1
|
A structure containing memory-related pointers. More...
#include <buffer.h>
Public Attributes | |
nb_alloc_fn | alloc_fn |
nb_realloc_fn | realloc_fn |
nb_free_fn | free_fn |
nb_copy_fn | copy_fn |
nb_move_fn | move_fn |
void * | context |
A structure containing memory-related pointers.
This is only useful if you have your own allocator or custom memory management.
nb_alloc_fn nb_buffer_memory_context::alloc_fn |
A function to allocate a memory block. It needs to have the same semantics of malloc
nb_realloc_fn nb_buffer_memory_context::realloc_fn |
A function to reallocate a memory block. It needs to have the same semantics of realloc
nb_free_fn nb_buffer_memory_context::free_fn |
A function to release a memory block allocated by alloc_fn
or realloc_fn
. Needs to have the same semantics of free
nb_copy_fn nb_buffer_memory_context::copy_fn |
A function to copy non-overlapping data from a block to another. It needs to have the same semantics of memcpy
nb_move_fn nb_buffer_memory_context::move_fn |
A function to copy possibly overlapping data from a block to another. It needs to have the same semantics of memmove
void* nb_buffer_memory_context::context |
A pointer to a user-data that will be passed in every memory-related call