libFirm
|
Macros | |
#define | XMALLOCN(type, n) |
Allocate n objects of a certain type. | |
#define | XMALLOCNZ(type, n) |
Allocate n objects of a certain type and zero them. | |
#define | XMALLOC(type) |
Allocate one object of a certain type. | |
#define | XMALLOCZ(type) |
Allocate one object of a certain type and zero it. | |
#define | XREALLOC(ptr, type, n) |
Reallocate n objects of a certain type. | |
#define | XMALLOCF(type, member, n) |
Allocate an object with n elements of a flexible array member. | |
#define | XMALLOCFZ(type, member, n) |
Allocate an object with n elements of a flexible array member and zero the whole object. | |
#define | ALLOCAN(type, n) |
Allocate n objects of a certain type on the stack. | |
#define | ALLOCANZ(type, n) |
Allocate n objects of a certain type on the stack and zero them. | |
#define | ALLOCAF(type, member, n) |
Allocate an object with n elements of a flexible array member on the stack. | |
#define | OALLOCN(obst, type, n) |
Allocate n objects of a certain type on the given obstack. | |
#define | OALLOCNZ(obst, type, n) |
Allocate n objects of a certain type on the given obstack and zero them. | |
#define | OALLOC(obst, type) |
Allocate one object of a certain type on the given obstack. | |
#define | OALLOCZ(obst, type) |
Allocate one object of a certain type on the given obstack and zero it. | |
#define | OALLOCF(obst, type, member, n) |
Allocate an object with n elements of a flexible array member on the given obstack. | |
#define | OALLOCFZ(obst, type, member, n) |
Allocate an object with n elements of a flexible array member on the given obstack and zero the whole object. | |
Functions | |
void * | xmalloc (size_t size) |
Allocate size bytes on the heap. | |
void * | xrealloc (void *ptr, size_t size) |
Chane size of a previously allocated memory block to size bytes. | |
char * | xstrdup (const char *str) |
Allocates memory and copies string str into it. | |
#define ALLOCAF | ( | type, | |
member, | |||
n ) |
#define ALLOCAN | ( | type, | |
n ) |
#define ALLOCANZ | ( | type, | |
n ) |
#define OALLOC | ( | obst, | |
type ) |
Allocate one object of a certain type on the given obstack.
#define OALLOCF | ( | obst, | |
type, | |||
member, | |||
n ) |
#define OALLOCFZ | ( | obst, | |
type, | |||
member, | |||
n ) |
Allocate an object with n elements of a flexible array member on the given obstack and zero the whole object.
#define OALLOCN | ( | obst, | |
type, | |||
n ) |
#define OALLOCNZ | ( | obst, | |
type, | |||
n ) |
#define OALLOCZ | ( | obst, | |
type ) |
Allocate one object of a certain type on the given obstack and zero it.
#define XMALLOC | ( | type | ) |
Allocate one object of a certain type.
#define XMALLOCF | ( | type, | |
member, | |||
n ) |
#define XMALLOCFZ | ( | type, | |
member, | |||
n ) |
Allocate an object with n elements of a flexible array member and zero the whole object.
#define XMALLOCN | ( | type, | |
n ) |
#define XMALLOCNZ | ( | type, | |
n ) |
#define XMALLOCZ | ( | type | ) |
Allocate one object of a certain type and zero it.
#define XREALLOC | ( | ptr, | |
type, | |||
n ) |
void * xmalloc | ( | size_t | size | ) |
Allocate size
bytes on the heap.
This is a wrapper for malloc which calls panic() in case of errors, so no error handling is required for code using it.
void * xrealloc | ( | void * | ptr, |
size_t | size ) |
Chane size of a previously allocated memory block to size
bytes.
This is a wrapper for realloc which calls panic() in case of errors, so no error handling is required for code using it.
char * xstrdup | ( | const char * | str | ) |
Allocates memory and copies string str
into it.
This is a wrapper for strdup which calls panic() in case of errors, so no error handling is required for code using it.