projects
/
IRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
62a2e53
)
print a better error message
author
bdemsky
<bdemsky>
Wed, 19 Nov 2008 06:07:52 +0000
(06:07 +0000)
committer
bdemsky
<bdemsky>
Wed, 19 Nov 2008 06:07:52 +0000
(06:07 +0000)
Robust/src/Runtime/garbage.c
patch
|
blob
|
history
diff --git
a/Robust/src/Runtime/garbage.c
b/Robust/src/Runtime/garbage.c
index 9684923dc3928672dd04efd23c0ebc282b0ce494..5fab5b8a7604becdf089fd6c4ed4b03f3949a085 100644
(file)
--- 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 (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;
}
to_heaptop=to_heapbase+last_heapsize;
to_heapptr=to_heapbase;
}