Mescal
|
Allocation helpers. Please use the macros of alloc.h instead of these. More...
#include "alloc.h"
Functions | |
void | multiple_free (void *p,...) |
Function to free memory using the free() function. | |
void | check_null (const char *function, char *file, int line, int n,...) |
Do not use this function directly; instead, use the macro CHECK_NULL(), which includes the error's location in the source code in the message. | |
Allocation helpers. Please use the macros of alloc.h instead of these.
void check_null | ( | const char * | function, |
char * | file, | ||
int | line, | ||
int | n, | ||
... ) |
Do not use this function directly; instead, use the macro CHECK_NULL(), which includes the error's location in the source code in the message.
void multiple_free | ( | void * | p, |
... ) |
Function to free memory using the free() function.
Calls free on a variable number of arguments. The last argument must be NULL
.
Example of use:
p2
is NULL, p3
will not be freed, which can cause a memory leak.