void * smemalloc(int coren, unsigned INTPTR isize, unsigned INTPTR * allocsize);
void * smemalloc_I(int coren, unsigned INTPTR isize, unsigned INTPTR * allocsize);
+#warning Block size is BAMBOO_SMEM_SIZE
+#warning Numblocks is BAMBOO_NUM_BLOCKS
#endif // BAMBOO_MULTICORE_MEM_H
pmc_heapptr->regions[regionnum].highunit=i;
pmc_heapptr->regions[regionnum].endptr=pmc_heapptr->units[i-1].endptr;
- pmc_heapptr->regions[regionnum+1].startptr=pmc_heapptr->units[i-1].endptr;
- pmc_heapptr->regions[regionnum+1].lowunit=i;
- regionnum++;
+ if((regionnum+1)<NUMCORES4GC) {
+ pmc_heapptr->regions[regionnum+1].startptr=pmc_heapptr->units[i-1].endptr;
+ pmc_heapptr->regions[regionnum+1].lowunit=i;
+ regionnum++;
+ }
totalbytes-=livebytespercore;
numregions=0;
}
tmc_spin_mutex_init(&pmc_heapptr->units[i].lock);
totalbytes+=pmc_heapptr->units[i].numbytes;
}
- pmc_heapptr->regions[regionnum].highunit=NUMPMCUNITS;
- pmc_heapptr->regions[regionnum].endptr=pmc_heapptr->units[NUMPMCUNITS-1].endptr;
- regionnum++;
+
for(;regionnum<NUMCORES4GC;regionnum++) {
pmc_heapptr->regions[regionnum].highunit=NUMPMCUNITS;
pmc_heapptr->regions[regionnum].endptr=pmc_heapptr->units[NUMPMCUNITS-1].endptr;