Implement initial memory manager infrastructure #24

Open
harraiken wants to merge 169 commits from memmgr into master
Showing only changes of commit e66baa0da0 - Show all commits

View File

@@ -165,6 +165,8 @@ MM::KernelPool::FreeKernelStack(IN PVOID Stack,
/* Convert the stack size into a page count */
StackPages = SIZE_TO_PAGES(StackSize);
/* Start guarded code block */
{
/* Acquire the PFN database lock */
KE::QueuedSpinLockGuard SpinLock(SystemSpaceLock);
@@ -181,6 +183,7 @@ MM::KernelPool::FreeKernelStack(IN PVOID Stack,
/* Advance to the next PTE */
PointerPte = MM::Paging::AdvancePte(PointerPte, -1);
}
}
/* Release all system PTEs used by the stack, including the guard page */
MM::Pte::ReleaseSystemPtes(PointerPte, StackPages + 1, SystemPteSpace);