From f056b4a93272231227592da61d6e95c09e5da0ab Mon Sep 17 00:00:00 2001 From: jjenista Date: Mon, 16 Aug 2010 19:15:26 +0000 Subject: [PATCH] change garbage.c initial heap size to a macro, configurable with a new buildscript option --- Robust/src/Runtime/garbage.c | 6 +++++- Robust/src/buildscript | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Robust/src/Runtime/garbage.c b/Robust/src/Runtime/garbage.c index 33dc8e12..c5da7ce8 100644 --- a/Robust/src/Runtime/garbage.c +++ b/Robust/src/Runtime/garbage.c @@ -35,7 +35,11 @@ extern struct QI * tailqi; #define NUMPTRS 100 -#define INITIALHEAPSIZE 256*1024*1024L +#ifndef INITIALHEAPSIZE_MB +#define INITIALHEAPSIZE_MB (256) +#endif + +#define INITIALHEAPSIZE INITIALHEAPSIZE_MB*1024*1024L #define GCPOINT(x) ((INTPTR)((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) ((INTPTR)(x+y))*2 diff --git a/Robust/src/buildscript b/Robust/src/buildscript index 4b898e7d..7ec263f5 100755 --- a/Robust/src/buildscript +++ b/Robust/src/buildscript @@ -105,6 +105,7 @@ echo -tagstate do tag state analysis echo -optional enable optional echo -debug generate debug symbols echo -prefetch do prefetch analysis +echo -heapsize-mb NUM set initial heap size in MB, default is 256 echo -garbagestats Print garbage collection statistics echo -webinterface enable web interface echo -runtimedebug printout runtime debug messages @@ -509,6 +510,11 @@ EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP" shift shift +elif [[ $1 = '-heapsize-mb' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DINITIALHEAPSIZE_MB=($2)" +shift + elif [[ $1 = '-rcr' ]] then JAVAOPTS="$JAVAOPTS -rcr" -- 2.34.1