Typedefs | |
typedef void *(* | peak_alloc_malloc_func )(size_t size) |
Malloc-like function pointer type. | |
typedef void(* | peak_alloc_free_func )(void *p) |
Free-like function pointer type. | |
Functions | |
void | peak_alloc_configure (peak_alloc_malloc_func malloc_fun, peak_alloc_free_func free_fun) |
Configure peak's allocation for your program. | |
void * | peak_allocate (size_t size) |
Allocate memory. | |
void | peak_deallocate (void *ptr) |
Free memory. | |
char * | peak_strdup (const char *str) |
Copy a string. | |
void * | peak_retain (void *obj) |
Retain a peak object. | |
void | peak_release (void *obj) |
Release a peak object. | |
int | peak_get_retcnt (void *obj) |
Get the retain count of a peak object. |
|
Configure peak's allocation for your program. Pointed functions must properly align memory and be thread-safe like malloc() and free()...
|
|
Allocate memory.
|
|
Free memory.
|
|
Get the retain count of a peak object.
|
|
Release a peak object. Decrease the reference count of the object obj. If the refcount is 0, the object is deallocated.
|
|
Retain a peak object. Increase the reference count of the object obj.
|
|
Copy a string.
|