From 1cadc26406e4e5f27b5cd390608f475fdf1f1463 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Mon, 29 Jun 2009 10:25:44 +0000 Subject: [PATCH] major change in the way GC works..hope it doesn't break stuff --- Robust/src/Runtime/garbage.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Robust/src/Runtime/garbage.c b/Robust/src/Runtime/garbage.c index 79948c2c..1ef15582 100644 --- a/Robust/src/Runtime/garbage.c +++ b/Robust/src/Runtime/garbage.c @@ -26,8 +26,8 @@ #define NUMPTRS 100 -#define INITIALHEAPSIZE 128*1024*1024 -#define GCPOINT(x) ((int)((x)*0.95)) +#define INITIALHEAPSIZE 256*1024*1024 +#define GCPOINT(x) ((int)((x)*0.99)) /* This define takes in how full the heap is initially and returns a new heap size to use */ #define HEAPSIZE(x,y) ((int)(x+y))*2 @@ -65,7 +65,7 @@ __thread struct listitem litem; if (orig>=curr_heapbase&&orig=curr_heapbase&&origmemorytop) { + if (memorybase==NULL||size>(memorytop-memorybase)) { int toallocate=(size>MEMORYBLOCK)?size:MEMORYBLOCK; memorybase=helper(stackptr, toallocate); memorytop=memorybase+toallocate; @@ -713,7 +713,7 @@ void * mygcmalloc(struct garbagelist * stackptr, int size) { if ((size&7)!=0) size=(size&~7)+8; curr_heapptr+=size; - if (curr_heapptr>curr_heapgcpoint) { + if (curr_heapptr>curr_heapgcpoint||curr_heapptr