#include <stdlib.h>
Go to the source code of this file.
Typedefs | |
typedef void *(* | ipod_memory_alloc_func )(size_t size, void *userData) |
Callback to allocate memory. | |
typedef void *(* | ipod_memory_realloc_func )(void *p, size_t size, void *userData) |
Callback to reallocate memory. | |
typedef void(* | ipod_memory_free_func )(void *p, void *userData) |
Callback to free memory. | |
Functions | |
void | ipod_memory_set_funcs (ipod_memory_alloc_func alloc_func, ipod_memory_realloc_func realloc_func, ipod_memory_free_func free_func, void *userData) |
Set the memory callback functions. | |
void * | ipod_memory_alloc (size_t size) |
Allocate memory. | |
void * | ipod_memory_realloc (void *p, size_t size) |
Reallocate memory. | |
void | ipod_memory_free (void *p) |
Free memory. | |
void | ipod_memory_report (void) |
Print out some internal statistics. |
typedef void*(* ipod_memory_alloc_func)(size_t size, void *userData) |
Callback to allocate memory.
size | the number of bytes to allocate | |
userData | implementation-specific data |
typedef void(* ipod_memory_free_func)(void *p, void *userData) |
Callback to free memory.
p | the block of memory to free | |
userData | implementation-specific data |
typedef void*(* ipod_memory_realloc_func)(void *p, size_t size, void *userData) |
Callback to reallocate memory.
p | the block of memory to be reallocated | |
size | the number of bytes to allocate | |
userData | implementation-specific data |
void* ipod_memory_alloc | ( | size_t | size | ) |
Allocate memory.
size | the number of bytes to allocate |
void ipod_memory_free | ( | void * | p | ) |
Free memory.
p | the block of memory to free |
void* ipod_memory_realloc | ( | void * | p, | |
size_t | size | |||
) |
Reallocate memory.
p | the block of memory to be reallocated | |
size | the number of bytes to allocate |
void ipod_memory_set_funcs | ( | ipod_memory_alloc_func | alloc_func, | |
ipod_memory_realloc_func | realloc_func, | |||
ipod_memory_free_func | free_func, | |||
void * | userData | |||
) |
Set the memory callback functions.
alloc_func | callback to allocate memory | |
realloc_func | callback to reallocate memory | |
free_func | callback to free memory | |
userData | implementation-specific data sent to the callbacks |