File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -391,7 +391,9 @@ void MeshableArena::partialScavenge() {
391391}
392392
393393void MeshableArena::scavenge (bool force) {
394- if (!force && _dirtyPageCount < kMinDirtyPageThreshold ) {
394+ const size_t minDirtyPageThreshold = (kMinDirtyPageThreshold * kPageSizeMin ) / getPageSize ();
395+
396+ if (!force && _dirtyPageCount < minDirtyPageThreshold) {
395397 return ;
396398 }
397399
Original file line number Diff line number Diff line change @@ -203,7 +203,9 @@ class MeshableArena : public mesh::OneWayMmapHeap {
203203 _dirty[span.spanClass ()].push_back (span);
204204 _dirtyPageCount += span.length ;
205205
206- if (_dirtyPageCount > kMaxDirtyPageThreshold ) {
206+ const size_t maxDirtyPageThreshold = (kMaxDirtyPageThreshold * kPageSizeMin ) / getPageSize ();
207+
208+ if (_dirtyPageCount > maxDirtyPageThreshold) {
207209 // do a full scavenge with a probability 1/10
208210 if (_fastPrng.inRange (0 , 9 ) == 9 ) {
209211 scavenge (true );
You can’t perform that action at this time.
0 commit comments