Skip to content

Commit 8635e90

Browse files
committed
Merging branch/2023-02-21/termux-build for GitHub pull request #164 <#164>.
2 parents e697ceb + 9d120e4 commit 8635e90

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

code/amcss.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,12 @@ static void report(void)
9595

9696
static mps_addr_t make(size_t rootsCount)
9797
{
98-
static unsigned long calls = 0;
98+
/* The calls variable is useful when debugging to stop the debugging
99+
after a certain number of allocations using a debugger
100+
"watchpoint". Allocations are a good "clock tick" for this test.
101+
The test itself doesn't use the variable, so we declare it
102+
volatile, which also forces updates into memory. */
103+
static volatile unsigned long calls = 0;
99104
size_t length = rnd() % (scale * avLEN);
100105
size_t size = (length+2) * sizeof(mps_word_t);
101106
mps_addr_t p;

code/poolawl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ static void awlSegReclaim(Seg seg, Trace trace)
10571057
Bool hasBuffer = SegBuffer(&buffer, seg);
10581058
Format format = pool->format;
10591059
Count reclaimedGrains = (Count)0;
1060-
Count preservedInPlaceCount = (Count)0;
1060+
STATISTIC_DECL(Count preservedInPlaceCount = (Count)0)
10611061
Size preservedInPlaceSize = (Size)0;
10621062
Index i;
10631063

@@ -1089,7 +1089,7 @@ static void awlSegReclaim(Seg seg, Trace trace)
10891089
AVER(BTGet(awlseg->scanned, i));
10901090
BTSetRange(awlseg->mark, i, j);
10911091
BTSetRange(awlseg->scanned, i, j);
1092-
++preservedInPlaceCount;
1092+
STATISTIC(++preservedInPlaceCount);
10931093
preservedInPlaceSize += AddrOffset(p, q);
10941094
} else {
10951095
BTResRange(awlseg->mark, i, j);

code/poollo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ static void loSegReclaim(Seg seg, Trace trace)
313313
Bool hasBuffer = SegBuffer(&buffer, seg);
314314
Count reclaimedGrains = (Count)0;
315315
Format format = NULL; /* suppress "may be used uninitialized" warning */
316-
Count preservedInPlaceCount = (Count)0;
316+
STATISTIC_DECL(Count preservedInPlaceCount = (Count)0)
317317
Size preservedInPlaceSize = (Size)0;
318318
Bool b;
319319

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

0 commit comments

Comments
 (0)