Vector 0.0.2
|
Allocator functions. More...
Functions | |
void * | vector_alloc (const size_t alloc_size, void *const param) |
Allocates memory chunk of alloc_size. | |
void * | vector_realloc (void *ptr, const size_t alloc_size, void *const param) |
Reallocates already allocated memory chunk in order to change allocation size. | |
void | vector_free (void *ptr, void *const param) |
Free allocation that was previously allocated. | |
Allocator functions.
These are weak symbols that can be overridden by the user. You can customize how you allocate underling memory for the vector. By passing param
you can go even further and customize allocation process per vector instance.
void * vector_alloc | ( | const size_t | alloc_size, |
void *const | param ) |
Allocates memory chunk of alloc_size.
[in] | alloc_size | Allocation size in bytes |
[in,out] | param | Optional allocator parameter. |
NULL
pointer on failure. Definition at line 44 of file aligned_alloc.c.
void * vector_realloc | ( | void * | ptr, |
const size_t | alloc_size, | ||
void *const | param ) |
Reallocates already allocated memory chunk in order to change allocation size.
[in] | ptr | Pointer to a memory chunk previously allocated with current allocator! |
[in] | alloc_size | Allocation size in bytes |
[in,out] | param | Optional allocator parameter. |
NULL
pointer on failure. Definition at line 51 of file aligned_alloc.c.
void vector_free | ( | void * | ptr, |
void *const | param ) |
Free allocation that was previously allocated.
[in] | ptr | Pointer to a memory chunk previously allocated with current allocator! |
[in,out] | param | Optional allocator parameter. |
Definition at line 74 of file aligned_alloc.c.