|
GRU - Generic Reusable Utilities
|
#include "gru_alloc.h"Functions | |
| void * | gru_alloc (size_t size, gru_status_t *status) |
| Allocate a block of memory. More... | |
| void | gru_dealloc (void **obj) |
| Deallocate a block of memory and set its pointer to NULL. More... | |
| void | gru_dealloc_string (char **obj) |
| Deallocate a block of memory used by a char * and set its pointer to NULL. More... | |
| void | gru_dealloc_const_string (const char **obj) |
| Deallocate a block of memory used by a const char * and set its pointer to NULL. More... | |
| void * gru_alloc | ( | size_t | size, |
| gru_status_t * | status | ||
| ) |
Allocate a block of memory.
| size | the amount of memory (in bytes) to allocate |
| status | a status pointer that will be set in case of failure |
| void gru_dealloc | ( | void ** | obj | ) |
Deallocate a block of memory and set its pointer to NULL.
| obj | a pointer to a pointer of block of memory to deallocate |
|
inline |
Deallocate a block of memory used by a const char * and set its pointer to NULL.
| obj | a pointer to a pointer of block of memory to deallocate |
|
inline |
Deallocate a block of memory used by a char * and set its pointer to NULL.
| obj | a pointer to a pointer of block of memory to deallocate |