xref: /csrg-svn/bin/test/stalloc.c (revision 53854)
1*53854Selan /*
2*53854Selan  * Copyright (c) 1988 The Regents of the University of California.
3*53854Selan  * All rights reserved.
4*53854Selan  *
5*53854Selan  * This code is derived from software contributed to Berkeley by
6*53854Selan  * Kenneth Almquist.
7*53854Selan  *
8*53854Selan  * %sccs.include.redist.c%
9*53854Selan  */
10*53854Selan 
11*53854Selan #ifndef lint
12*53854Selan char copyright[] =
13*53854Selan "@(#) Copyright (c) 1988 The Regents of the University of California.\n\
14*53854Selan  All rights reserved.\n";
15*53854Selan #endif /* not lint */
16*53854Selan 
17*53854Selan #ifndef lint
18*53854Selan static char sccsid[] = "@(#)stalloc.c	1.1 (Berkeley) 06/03/92";
19*53854Selan #endif /* not lint */
20*53854Selan 
21*53854Selan #include <stdio.h>
22*53854Selan #include <stdlib.h>
23*53854Selan 
24*53854Selan void *
25*53854Selan stalloc(nbytes)
26*53854Selan 	int nbytes;
27*53854Selan {
28*53854Selan       register void *p;
29*53854Selan 
30*53854Selan       if ((p = malloc(nbytes)) == NULL)
31*53854Selan 	    error("Out of space");
32*53854Selan       return p;
33*53854Selan }
34