[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / runtime / regex / test / xmalloc.c
1 #include <stdio.h>
2 extern char *malloc ();
3
4 #ifndef NULL
5 #define NULL 0
6 #endif
7
8 void *
9 xmalloc (size)
10   unsigned size;
11 {
12   char *new_mem = malloc (size); 
13   
14   if (new_mem == NULL)
15     {
16       fprintf (stderr, "xmalloc: request for %u bytes failed.\n", size);
17       abort ();
18     }
19
20   return new_mem;
21 }