From ad62f61fb4367f20049d606178e918ceb89a67cb Mon Sep 17 00:00:00 2001 From: bdemsky Date: Wed, 19 Nov 2008 06:07:52 +0000 Subject: [PATCH] print a better error message --- Robust/src/Runtime/garbage.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.34.1