#include "multicoremem.h"
#include "multicoregarbage.h"
#endif
+#ifdef PMC_GC
+#include "multicoregc.h"
+#include "pmc_garbage.h"
+#endif
#if defined(MULTICORE_GC)||defined(PMC_GC)
extern volatile bool gcflag;
int hasgc = 0;
int loopcount = 0;
- while(loopcount<10000) {
+ while(true) {
p = BAMBOO_SHARE_MEM_CALLOC(isize); // calloc(m, isize);
if(p != NULL)
return p;
// no more global shared memory
- if(hasgc < 5) {
+ if(hasgc < 30) {
// start gc
if(gcflag) {
gc(stackptr);
printf("Did %u collections without getting memory\n", hasgc);
BAMBOO_EXIT();
}
+ loopcount++;
+ if (loopcount>10000000)
+ tprintf("Loopcount in mycalloc_share hit %u\n",loopcount);
}
- tprintf("Loopcount hit 10000\n");
+
BAMBOO_EXIT();
return NULL;
}