#include "exit.h"
#include "intl.h"
-void *_mem_calloc (size_t nmemb, size_t size, int line, const char* fname) {
- void *p;
-
- if (!nmemb || !size)
- return NULL;
-
- if (((size_t) - 1) / nmemb <= size) {
- exit_fatal ("mem_calloc", _("Integer overflow -- can't allocate memory!"),
- line, fname, 1);
- return (NULL);
- }
-
- if (!(p = calloc (nmemb, size))) {
- exit_fatal ("mem_calloc", _("Out of memory!"), line, fname, 1);
- return (NULL);
- }
- return p;
-}
-
void _mem_realloc (void *ptr, size_t siz, int line, const char* fname) {
void *r;
void **p = (void **) ptr;