Commit 8a9d1fa9 authored by Niels Möller's avatar Niels Möller

(xalloc): New function.

Rev: nettle/tools/misc.c:1.3
Rev: nettle/tools/misc.h:1.3
parent a538a476
......@@ -50,6 +50,19 @@ werror(const char *format, ...)
va_end(args);
}
void *
xalloc(size_t size)
{
void *p = malloc(size);
if (!p)
{
fprintf(stderr, "Virtual memory exhausted.\n");
abort();
}
return p;
}
const char
sexp_token_chars[0x80] =
{
......
......@@ -43,6 +43,9 @@ werror(const char *format, ...)
#endif
;
void *
xalloc(size_t size);
enum sexp_mode
{
SEXP_CANONICAL = 0,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment