#ifndef lint
static char sccsid[] = "@(#)memalloc.c	1.2 (mg@ukc.ac.uk) 5/3/90";
#endif
#include "cs.h"				/*				       MEMALLOC.C		*/

static memdie()
{
  fprintf(stderr,"memory allocate failure");
  exit(1);
}

 char *
mcalloc(nbytes)		/* allocate new memory space, cleared to 0 */
 register long nbytes;
{
	register char *p;

	if ((p = calloc((size_t)1,(size_t)nbytes)) == NULL)
		memdie();
	return(p);
}

 char *
mmalloc(nbytes)	     /* allocate new memory space, NOT cleared to 0 */
 register long nbytes;
{
	register char *p;

	if ((p = malloc((size_t)nbytes)) == NULL)
		memdie();
	return(p);
}
