void al_set_memory_management_functions(
void *(*malloc)(void *opaque, size_t size),
void *(*malloc_atomic)(void *opaque, size_t size),
void (*free)(void *opaque, void *ptr),
void *(*realloc)(void *opaque, void *ptr, size_t size),
void *(*debug_malloc)(int line, const char *file, const char *func,
void *opaque, size_t size),
void *(*debug_malloc_atomic)(int line, const char *file, const char *func,
void *opaque, size_t size),
void (*debug_free)(int line, const char *file, const char *func,
void *opaque, void *ptr),
void *(*debug_realloc)(int line, const char *file, const char *func,
void *opaque, void *ptr, size_t size),
void *user_opaque)
Customise the memory management functions used by the library. A default function will be used in place of any function pointer which is NULL. The default debug variants simply call the non-debug variants. - malloc_atomic - malloc() replacement for objects not containing pointers
- user_opaque - will be passed through to all the functions above
|