#define NUMPTRS 100
-#define INITIALHEAPSIZE 32*1024*1024
-#define GCPOINT(x) ((int)((x)*0.9))
+#define INITIALHEAPSIZE 128*1024*1024
+#define GCPOINT(x) ((int)((x)*0.95))
/* This define takes in how full the heap is initially and returns a new heap size to use */
-#define HEAPSIZE(x,y) (((int)((x)/0.6))+y)
+#define HEAPSIZE(x,y) ((int)(x+y))*2
#ifdef TASK
extern struct genhashtable * activetasks;
/* Update stat on previous gc size */
lastgcsize=(to_heapptr-to_heapbase)+size;
+#ifdef GARBAGESTATS
+ printf("Garbage collected: Old bytes: %u\n", curr_heapptr-curr_heapbase);
+ printf("New space: %u\n", to_heapptr-to_heapbase);
+ printf("Total space: %u\n", to_heaptop-to_heapbase);
+#endif
/* Flip to/curr heaps */
{
void * tmp=to_heapbase;
echo -debug generate debug symbols
echo -prefetch do prefetch analysis
echo -transstats generates transaction stats on commits and aborts
+echo -garbagestats Print garbage collection statistics
echo -webinterface enable web interface
echo -runtimedebug printout runtime debug messages
echo "-thread use support for multiple threads"
elif [[ $1 = '-nojava' ]]
then
NOJAVA=true
+elif [[ $1 = '-garbagestats' ]]
+then
+EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
elif [[ $1 = '-fastcheck' ]]
then
EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"