diff --git a/compiler-rt/lib/scudo/standalone/primary64.h b/compiler-rt/lib/scudo/standalone/primary64.h index 97188a5ac235c..1865ed41368e3 100644 --- a/compiler-rt/lib/scudo/standalone/primary64.h +++ b/compiler-rt/lib/scudo/standalone/primary64.h @@ -1492,6 +1492,8 @@ template class SizeClassAllocator64 { } const uptr PushedBytesDelta = BytesInBG - BG->BytesInBGAtLastCheckpoint; + if (PushedBytesDelta < getMinReleaseAttemptSize(BlockSize)) + continue; // Given the randomness property, we try to release the pages only if the // bytes used by free blocks exceed certain proportion of group size. Note