more odd core count bugs
[IRC.git] / Robust / src / Runtime / bamboo / pmc_forward.c
index d886b552f13d3a93f03d4f898882f5a3cb60c536..c60d7ce5c4060770d4893c89559eaaaedf316910 100644 (file)
@@ -86,8 +86,10 @@ void pmc_processunits() {
   for(;regionnum<NUMCORES4GC;regionnum++) {
     pmc_heapptr->regions[regionnum].highunit=NUMPMCUNITS;
     pmc_heapptr->regions[regionnum].endptr=pmc_heapptr->units[NUMPMCUNITS-1].endptr;
-    pmc_heapptr->regions[regionnum+1].startptr=pmc_heapptr->units[NUMPMCUNITS-1].endptr;
-    pmc_heapptr->regions[regionnum+1].lowunit=NUMPMCUNITS;
+    if ((regionnum+1)<NUMCORES4GC) {
+      pmc_heapptr->regions[regionnum+1].startptr=pmc_heapptr->units[NUMPMCUNITS-1].endptr;
+      pmc_heapptr->regions[regionnum+1].lowunit=NUMPMCUNITS;
+    }
   }
 }