-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_malloc (size_t siz, int line, const char* fname) {
- void *p;
-
- if (siz == 0)
- return 0;
- if ((p = (void *) malloc (siz)) == 0) { /* __MEM_CHECKED__ */
- exit_fatal ("mem_malloc", _("Out of memory!"), line, fname, 1);
- return (NULL);
- }
- return (p);
-}
-