From: Richard M. Stallman Date: Wed, 13 Jul 1994 19:10:27 +0000 (+0000) Subject: (xmalloc): New function. X-Git-Tag: emacs-19.34~7612 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=20e15dfd12e30a599ba480c73aca0b1662c4cd80;p=emacs.git (xmalloc): New function. --- diff --git a/lib-src/timer.c b/lib-src/timer.c index acb84ea5583..1fd7836802f 100644 --- a/lib-src/timer.c +++ b/lib-src/timer.c @@ -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 */