#include "util.h"
Go to the source code of this file.
Functions | |
| char * | MMalloc (int size) |
| Safe malloc. | |
| char * | MMrealloc (char *obj, int size) |
| Safe realloc. | |
| void | MMfree (char *obj) |
| Safe free. | |
It forces well-defined semantics for several 'borderline' cases:
malloc() of a 0 size object is guaranteed to return something which is not 0, and can safely be freed (but not dereferenced) free() accepts (silently) an 0 pointer malloc() Definition in file safe_mem.c.
| char* MMalloc | ( | int | size | ) |
| void MMfree | ( | char * | obj | ) |
| char* MMrealloc | ( | char * | obj, | |
| int | size | |||
| ) |