#include "gru_base.h"
#include "gru_status.h"
Go to the source code of this file.
|
#define | gru_alloc_check(obj, ret) |
| Check whether the allocation was successfull otherwise return whatever set as ret. More...
|
|
#define gru_alloc_check |
( |
|
obj, |
|
|
|
ret |
|
) |
| |
Value:if (obj == NULL) \
return ret;
Check whether the allocation was successfull otherwise return whatever set as ret.
Allocate a block of memory.
- Parameters
-
size | the amount of memory (in bytes) to allocate |
status | a status pointer that will be set in case of failure |
- Returns
- a pointer to the newly allocated memory or NULL if failed
Deallocate a block of memory and set its pointer to NULL.
- Parameters
-
obj | a pointer to a pointer of block of memory to deallocate |
gru_export void gru_dealloc_const_string |
( |
const char ** |
obj | ) |
|
|
inline |
Deallocate a block of memory used by a const char * and set its pointer to NULL.
- Parameters
-
obj | a pointer to a pointer of block of memory to deallocate |
Deallocate a block of memory used by a char * and set its pointer to NULL.
- Parameters
-
obj | a pointer to a pointer of block of memory to deallocate |