another odd core bug
authorbdemsky <bdemsky>
Fri, 15 Jul 2011 23:58:54 +0000 (23:58 +0000)
committerbdemsky <bdemsky>
Fri, 15 Jul 2011 23:58:54 +0000 (23:58 +0000)
Robust/src/Runtime/bamboo/pmc_mem.c

index 191ce43b4973ee51a754032c303e30c412b9543a..be245173b724f34b6b083764c1c98064629cc02d 100644 (file)
@@ -22,7 +22,7 @@ void * pmc_alloc(unsigned int * numbytesallocated, unsigned int minimumbytes) {
        if ((finishptr-startptr)<memcheck)
          break;
        unsigned int startindex=region->lowunit;
-       unsigned int endindex=pmc_heapptr->regions[i+1].highunit;
+       unsigned int endindex=(i+1)<NUMCORES4GC?pmc_heapptr->regions[i+1].highunit:pmc_heapptr->regions[i].highunit;
        void * newstartptr=startptr+memcheck;
        
        //update unit end points