From 1ed4289ac4f9826f13840379441519fafefb5af4 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Sat, 23 Jul 2011 21:11:02 +0000 Subject: [PATCH] this should fix dtlb misses --- Robust/src/Runtime/bamboo/pmc_forward.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Robust/src/Runtime/bamboo/pmc_forward.c b/Robust/src/Runtime/bamboo/pmc_forward.c index 746d947f..c2c158af 100644 --- a/Robust/src/Runtime/bamboo/pmc_forward.c +++ b/Robust/src/Runtime/bamboo/pmc_forward.c @@ -23,6 +23,7 @@ void pmc_countbytes(struct pmc_unit * unit, void *bottomptr, void *topptr) { unsigned int totalbytes=0; void * lastunmarked=NULL; bool padokay=false; + while(tmpptrhighunit-1:region->highunit-2; void * lastunitend=pmc_unitend(lastunit); - while(lastunitend>=region->lastptr) { + //move units that are nominally supposed to be in free area back to the right location + while(lastunitend>=region->lastptr&&lastunit>=region->lowunit) { pmc_heapptr->units[lastunit].endptr=lastunitend; //tprintf("Ch3: %u -> %x\n", lastunit, lastunitend); lastunit--; lastunitend=pmc_unitend(lastunit); } + //move units that are actually in the free area (but nominaly not supposed to be) to the end pointer + while(lastunit>=region->lowunit&&pmc_heapptr->units[lastunit].endptr>region->lastptr) { + pmc_heapptr->units[lastunit].endptr=region->lastptr; + lastunit--; + } } + while(tmpptr