A memory allocator. More...
#include <jas_malloc.h>
Public Member Functions | |
void | reserved (void) |
Public Attributes | |
void(* | cleanup )(struct jas_allocator_s *allocator) |
void *(* | alloc )(struct jas_allocator_s *allocator, size_t size) |
void(* | free )(struct jas_allocator_s *allocator, void *pointer) |
void *(* | realloc )(struct jas_allocator_s *allocator, void *pointer, size_t new_size) |
A memory allocator.
void jas_allocator_s::reserved | ( | void | ) |
For future use.
void*(* jas_allocator_s::alloc) (struct jas_allocator_s *allocator, size_t size) |
Function to allocate memory. This function should have behavior similar to malloc.
void(* jas_allocator_s::cleanup) (struct jas_allocator_s *allocator) |
Function to clean up the allocator when no longer needed. The allocator cannot be used after the clean-up operation is performed. This function pointer may be null, in which case the clean-up operation is treated as a no-op.
void(* jas_allocator_s::free) (struct jas_allocator_s *allocator, void *pointer) |
Function to deallocate memory. This function should have behavior similar to free.
void*(* jas_allocator_s::realloc) (struct jas_allocator_s *allocator, void *pointer, size_t new_size) |
Function to reallocate memory. This function should have behavior similar to realloc.