BlockIP
|
Macros | |
#define | ALLOC(n, type) (type *)malloc((n)*sizeof(type)) |
#define | REALLOC(ptr, n, type) (type *)realloc(((char *)ptr),(n)*sizeof(type)) |
#define | FREE(p) if (p) {free(p); (p)= NULL;} |
#define | TRY_ALLOC(ptr, n, type) if (!(ptr= ALLOC((n),type)) ) {throw ExceptionBlockIP(OUT_OF_MEMORY, __FILE__, __LINE__);} |
#define | TRY_REALLOC(ptr, n, type) if (!(ptr= REALLOC((ptr),(n),type)) ) {throw ExceptionBlockIP(OUT_OF_MEMORY, __FILE__, __LINE__);} |
#define | FREE(p) if (p) {free(p); (p)= NULL;} |
#define ALLOC | ( | n, | |
type | |||
) | (type *)malloc((n)*sizeof(type)) |
#define FREE | ( | p | ) | if (p) {free(p); (p)= NULL;} |
#define FREE | ( | p | ) | if (p) {free(p); (p)= NULL;} |
#define REALLOC | ( | ptr, | |
n, | |||
type | |||
) | (type *)realloc(((char *)ptr),(n)*sizeof(type)) |
#define TRY_ALLOC | ( | ptr, | |
n, | |||
type | |||
) | if (!(ptr= ALLOC((n),type)) ) {throw ExceptionBlockIP(OUT_OF_MEMORY, __FILE__, __LINE__);} |
#define TRY_REALLOC | ( | ptr, | |
n, | |||
type | |||
) | if (!(ptr= REALLOC((ptr),(n),type)) ) {throw ExceptionBlockIP(OUT_OF_MEMORY, __FILE__, __LINE__);} |