Commit 20e15dfd authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(xmalloc): New function.

parent bab863c3
......@@ -349,4 +349,21 @@ strerror (errnum)
#endif /* ! HAVE_STRERROR */
long *
xmalloc (size)
int size;
{
register long *val;
val = (long *) malloc (size);
if (!val && size)
{
fprintf (stderr, "timer: virtual memory exceeded\n");
exit (1);
}
return val;
}
/* timer.c ends here */
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