36 |
* Return: |
* Return: |
37 |
* Pointer to allocated memory |
* Pointer to allocated memory |
38 |
*/ |
*/ |
39 |
|
void * |
40 |
void *xcalloc(size_t bytes) |
xcalloc(size_t bytes) |
41 |
{ |
{ |
42 |
void *ret = calloc(1, bytes); |
void *ret = calloc(1, bytes); |
43 |
assert(ret); |
assert(ret); |
45 |
return ret; |
return ret; |
46 |
} |
} |
47 |
|
|
|
|
|
|
|
|
48 |
/* xfree |
/* xfree |
49 |
* |
* |
50 |
* Free memory allocated with xcalloc |
* Free memory allocated with xcalloc |
55 |
* Return: |
* Return: |
56 |
* None |
* None |
57 |
*/ |
*/ |
58 |
|
void |
59 |
void xfree(void *ptr) |
xfree(void *ptr) |
60 |
{ |
{ |
61 |
free(ptr); |
free(ptr); |
62 |
} |
} |