1 |
rakinar2 |
23 |
#ifndef UAR_XMALLOC_H |
2 |
|
|
#define UAR_XMALLOC_H |
3 |
|
|
|
4 |
|
|
#include <stddef.h> |
5 |
|
|
|
6 |
rakinar2 |
32 |
/* Allocate memory and abort process on error. */ |
7 |
rakinar2 |
23 |
void *xmalloc (size_t size); |
8 |
rakinar2 |
32 |
|
9 |
|
|
/* Allocate 'n' zeroed memory block of 'size' and abort process on error. */ |
10 |
rakinar2 |
23 |
void *xcalloc (size_t nmemb, size_t size); |
11 |
rakinar2 |
32 |
|
12 |
|
|
/* Reallocate memory and abort process on error. */ |
13 |
rakinar2 |
23 |
void *xrealloc (void *ptr, size_t size); |
14 |
|
|
|
15 |
|
|
#endif /* UAR_XMALLOC_H */ |