#include <sys/types.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
|
#define | MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) |
|
|
void * | reallocarray (void *optr, size_t nmemb, size_t size) |
| Similar to realloc() but for an array of items, like calloc() More...
|
|
- Author
- Otto Moerbeek
- Date
- 2008
- Copyright
- ISC License
◆ reallocarray()
void* reallocarray |
( |
void * |
optr, |
|
|
size_t |
nmemb, |
|
|
size_t |
size |
|
) |
| |
Similar to realloc() but for an array of items, like calloc()
- Parameters
-
optr | Pointer to old (current) array |
nmemb | Number of elements |
size | Size of each element, in bytes |
- Returns
- A pointer to the new array, or
NULL
on error.