kernel: Add assertions to ensure vm_page_reservation is destroyed with a count of 0.

Inspired by some of jpelczar's changes.
This commit is contained in:
Augustin Cavalier
2024-09-10 12:13:38 -04:00
parent 5f8fe75449
commit b4798ac6a7
2 changed files with 11 additions and 1 deletions
+8
View File
@@ -20,6 +20,14 @@ extern int32 gMappedPagesCount;
struct vm_page_reservation {
uint32 count;
#if KDEBUG && defined(__cplusplus)
vm_page_reservation() : count(0) {}
~vm_page_reservation()
{
ASSERT(count == 0);
}
#endif
};