1 /* $Id: Salloc.c,v 1.7 1994/06/24 11:06:30 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
6 /* M E M O R Y A L L O C A T I O N R O U T I N E S */
8 /* The memory allocation routines offered in this file are:
10 char *Salloc(str, n) : allocate n bytes, initialized with the string
17 extern char *malloc();
25 register unsigned int sz;
27 /* Salloc() is not a primitive function: it just allocates a
28 piece of storage and copies a given string into it.
30 char *res = malloc(sz);
31 register char *m = res;
33 if (sz && m == 0) No_Mem();