VMCache: Factor out a _FreePageRange method.

The code in the Resize and Rebase methods was identical except for the
iterator.

Change-Id: I9f6b3c2c09af0c26778215bd627fed030c4d46f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2835
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Michael Lotz
2020-05-30 01:47:40 +00:00
committed by waddlesplash
parent 57656b93b6
commit 428bc69ab8
2 changed files with 52 additions and 67 deletions
+3
View File
@@ -215,6 +215,9 @@ private:
void _MergeWithOnlyConsumer();
void _RemoveConsumer(VMCache* consumer);
bool _FreePageRange(VMCachePagesTree::Iterator it,
page_num_t* toPage);
private:
int32 fRefCount;
mutex fLock;