Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion code/amcss.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ static void report(void)

static mps_addr_t make(size_t rootsCount)
{
static unsigned long calls = 0;
/* The calls variable is useful when debugging to stop the debugging
after a certain number of allocations using a debugger
"watchpoint". Allocations are a good "clock tick" for this test.
The test itself doesn't use the variable, so we declare it
volatile, which also forces updates into memory. */
static volatile unsigned long calls = 0;
size_t length = rnd() % (scale * avLEN);
size_t size = (length+2) * sizeof(mps_word_t);
mps_addr_t p;
Expand Down
4 changes: 2 additions & 2 deletions code/poolawl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ static void awlSegReclaim(Seg seg, Trace trace)
Bool hasBuffer = SegBuffer(&buffer, seg);
Format format = pool->format;
Count reclaimedGrains = (Count)0;
Count preservedInPlaceCount = (Count)0;
STATISTIC_DECL(Count preservedInPlaceCount = (Count)0)
Size preservedInPlaceSize = (Size)0;
Index i;

Expand Down Expand Up @@ -1089,7 +1089,7 @@ static void awlSegReclaim(Seg seg, Trace trace)
AVER(BTGet(awlseg->scanned, i));
BTSetRange(awlseg->mark, i, j);
BTSetRange(awlseg->scanned, i, j);
++preservedInPlaceCount;
STATISTIC(++preservedInPlaceCount);
preservedInPlaceSize += AddrOffset(p, q);
} else {
BTResRange(awlseg->mark, i, j);
Expand Down
4 changes: 2 additions & 2 deletions code/poollo.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ static void loSegReclaim(Seg seg, Trace trace)
Bool hasBuffer = SegBuffer(&buffer, seg);
Count reclaimedGrains = (Count)0;
Format format = NULL; /* supress "may be used uninitialized" warning */
Count preservedInPlaceCount = (Count)0;
STATISTIC_DECL(Count preservedInPlaceCount = (Count)0)
Size preservedInPlaceSize = (Size)0;
Bool b;

Expand Down Expand Up @@ -355,7 +355,7 @@ static void loSegReclaim(Seg seg, Trace trace)
q = (*format->skip)(AddrAdd(p, format->headerSize));
q = AddrSub(q, format->headerSize);
if(BTGet(loseg->mark, i)) {
++preservedInPlaceCount;
STATISTIC(++preservedInPlaceCount);
preservedInPlaceSize += AddrOffset(p, q);
} else {
Index j = PoolIndexOfAddr(base, pool, q);
Expand Down