xref: /csrg-svn/bin/test/stalloc.c (revision 53858)
153854Selan /*
253854Selan  * Copyright (c) 1988 The Regents of the University of California.
353854Selan  * All rights reserved.
453854Selan  *
553854Selan  * This code is derived from software contributed to Berkeley by
653854Selan  * Kenneth Almquist.
753854Selan  *
853854Selan  * %sccs.include.redist.c%
953854Selan  */
1053854Selan 
1153854Selan #ifndef lint
12*53858Selan static char copyright[] =
1353854Selan "@(#) Copyright (c) 1988 The Regents of the University of California.\n\
1453854Selan  All rights reserved.\n";
1553854Selan #endif /* not lint */
1653854Selan 
1753854Selan #ifndef lint
18*53858Selan static char sccsid[] = "@(#)stalloc.c	1.2 (Berkeley) 06/03/92";
1953854Selan #endif /* not lint */
2053854Selan 
2153854Selan #include <stdio.h>
2253854Selan #include <stdlib.h>
2353854Selan 
2453854Selan void *
stalloc(nbytes)2553854Selan stalloc(nbytes)
2653854Selan 	int nbytes;
2753854Selan {
2853854Selan       register void *p;
2953854Selan 
3053854Selan       if ((p = malloc(nbytes)) == NULL)
3153854Selan 	    error("Out of space");
3253854Selan       return p;
3353854Selan }
34