scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

xmalloc.c (204B)


      1 /* See LICENSE file for copyright and license details. */
      2 #include <stdlib.h>
      3 #include "../inc/cc.h"
      4 
      5 void *
      6 xmalloc(size_t size)
      7 {
      8 	void *p = malloc(size);
      9 
     10 	if (!p)
     11 		die("out of memory");
     12 	return p;
     13 }