ret = strndup(s, n);
#endif
if (!ret) {
- fatal("Out of memory in x_strndup");
+ fatal("x_strndup: Could not allocate %lu bytes", (unsigned long)n);
}
return ret;
}
void *ret;
ret = malloc(size);
if (!ret) {
- fatal("Out of memory in x_malloc");
+ fatal("x_malloc: Could not allocate %lu bytes", (unsigned long)size);
}
return ret;
}
if (!ptr) return x_malloc(size);
p2 = realloc(ptr, size);
if (!p2) {
- fatal("Out of memory in x_realloc");
+ fatal("x_realloc: Could not allocate %lu bytes", (unsigned long)size);
}
return p2;
}