1: # include   <useful.h>
   2: # include   <sccs.h>
   3: 
   4: SCCSID(@(#)xalloc.c	8.1	12/31/84)
   5: 
   6: /*
   7: **  XALLOC -- allocate block of memory.
   8: **
   9: **	This is just like malloc, except that it is guaranteed
  10: **	to succeed.  It will syserr if it fails.
  11: **
  12: **	Parameters:
  13: **		sz -- size in bytes of memory area to allocate.
  14: **
  15: **	Returns:
  16: **		pointer to area allocated.
  17: **
  18: **	Side Effects:
  19: **		none.
  20: **
  21: **	Trace Flags:
  22: **		none.
  23: */
  24: 
  25: char *
  26: xalloc(sz)
  27: int sz;
  28: {
  29:     register char   *p;
  30:     extern char *malloc();
  31: 
  32:     p = malloc(sz);
  33:     if (p == NULL)
  34:         syserr("Out of memory");
  35:     return (p);
  36: }

Defined functions

xalloc defined in line 4; never used
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 858
Valid CSS Valid XHTML 1.0 Strict