Prevent adding referenced pages to the free list
This commit is contained in:
@@ -187,8 +187,13 @@ MM::Pfn::ProcessMemoryDescriptor(IN PFN_NUMBER BasePage,
|
||||
/* Iterate over each page in this free memory run */
|
||||
for(PageNumber = 0; PageNumber < PageCount; PageNumber++)
|
||||
{
|
||||
/* Add the page to the free list to make it available for allocation */
|
||||
LinkFreePage(BasePage + PageNumber);
|
||||
/* Get the PFN entry for the current page and ensure it is not referenced */
|
||||
Pfn = GetPfnEntry(BasePage + PageNumber);
|
||||
if(Pfn->u3.e2.ReferenceCount == 0)
|
||||
{
|
||||
/* Add the page to the free list to make it available for allocation */
|
||||
LinkFreePage(BasePage + PageNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user