change garbage.c initial heap size to a macro, configurable with a new buildscript...
authorjjenista <jjenista>
Mon, 16 Aug 2010 19:15:26 +0000 (19:15 +0000)
committerjjenista <jjenista>
Mon, 16 Aug 2010 19:15:26 +0000 (19:15 +0000)
Robust/src/Runtime/garbage.c
Robust/src/buildscript

index 33dc8e129d39919fd91aff2b11c226f65e12a079..c5da7ce80f8b73df7ad96d25bb9c132c0e709bd7 100644 (file)
@@ -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
index 4b898e7da93f18385772899d733277d0995759b5..7ec263f50f8ed78c16844b850a33191f940cbc3c 100755 (executable)
@@ -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"