Skip to content

Commit cb3e7b3

Browse files
authored
Reapply "[scudo] Apply the min release threshold to the group" (#112252) (#112266)
This reverts commit 037938d. Fixed the iterator to avoid infinite loop
1 parent 706c9da commit cb3e7b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler-rt/lib/scudo/standalone/primary64.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,11 @@ template <typename Config> class SizeClassAllocator64 {
14921492
}
14931493

14941494
const uptr PushedBytesDelta = BytesInBG - BG->BytesInBGAtLastCheckpoint;
1495+
if (PushedBytesDelta < getMinReleaseAttemptSize(BlockSize)) {
1496+
Prev = BG;
1497+
BG = BG->Next;
1498+
continue;
1499+
}
14951500

14961501
// Given the randomness property, we try to release the pages only if the
14971502
// bytes used by free blocks exceed certain proportion of group size. Note

0 commit comments

Comments
 (0)