From a0fd8467d97cfa23c536bc5ff205c7a2aa648852 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 2 Oct 2024 16:08:04 -0400 Subject: [PATCH] kernel/vm: Add assertion for a TODO in SetMinimalCommitment. --- src/system/kernel/vm/VMCache.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/system/kernel/vm/VMCache.cpp b/src/system/kernel/vm/VMCache.cpp index 4cbc6a15e5..16b12c9a6b 100644 --- a/src/system/kernel/vm/VMCache.cpp +++ b/src/system/kernel/vm/VMCache.cpp @@ -1092,8 +1092,7 @@ VMCache::SetMinimalCommitment(off_t commitment, int priority) // If we don't have enough committed space to cover through to the new end // of the area... if (committed_size < commitment) { - // ToDo: should we check if the cache's virtual size is large - // enough for a commitment of that size? + ASSERT(commitment <= ROUNDUP(virtual_end - virtual_base, B_PAGE_SIZE)); // try to commit more memory status = Commit(commitment, priority);