From: bdemsky Date: Wed, 19 Nov 2008 06:07:52 +0000 (+0000) Subject: print a better error message X-Git-Tag: buildscript^7~29 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ad62f61fb4367f20049d606178e918ceb89a67cb;p=IRC.git print a better error message --- diff --git a/Robust/src/Runtime/garbage.c b/Robust/src/Runtime/garbage.c index 9684923d..5fab5b8a 100644 --- a/Robust/src/Runtime/garbage.c +++ b/Robust/src/Runtime/garbage.c @@ -509,6 +509,10 @@ void * mygcmalloc(struct garbagelist * stackptr, int size) { if (last_heapsize>to_heapsize) { free(to_heapbase); to_heapbase=malloc(last_heapsize); + if (to_heapbase==NULL) { + printf("Error Allocating enough memory\n"); + exit(-1); + } to_heaptop=to_heapbase+last_heapsize; to_heapptr=to_heapbase; }