[NTOS]: Implement the MAREA<->VAD hack for section VADs as well.

svn path=/trunk/; revision=49204
This commit is contained in:
Sir Richard 2010-10-19 17:00:12 +00:00
parent a0cd959fc1
commit 785baaf68e

View file

@ -133,8 +133,9 @@ MiInsertNode(IN PMM_AVL_TABLE Table,
} }
else else
{ {
/* This is a section VAD, this code doesn't happen yet */ /* This is a section VAD. Store the MAREA here for now */
ASSERT(FALSE); DPRINT("Storing %p in %p\n", MemoryArea, Vad);
Vad->ControlArea->WaitingForDeletion = (PVOID)MemoryArea;
} }
} }
} }
@ -191,6 +192,14 @@ MiRemoveNode(IN PMMADDRESS_NODE Node,
{ {
/* We store the ReactOS MEMORY_AREA here */ /* We store the ReactOS MEMORY_AREA here */
MemoryArea = (PMEMORY_AREA)Vad->FirstPrototypePte; MemoryArea = (PMEMORY_AREA)Vad->FirstPrototypePte;
}
else
{
/* This is a section VAD. We store the ReactOS MEMORY_AREA here */
MemoryArea = (PMEMORY_AREA)Vad->ControlArea->WaitingForDeletion;
}
/* Make sure one actually still exists */
if (MemoryArea) if (MemoryArea)
{ {
/* Get the process */ /* Get the process */
@ -204,12 +213,6 @@ MiRemoveNode(IN PMMADDRESS_NODE Node,
MmFreeMemoryArea(&Process->Vm, MemoryArea, NULL, NULL); MmFreeMemoryArea(&Process->Vm, MemoryArea, NULL, NULL);
} }
} }
else
{
/* This is a section VAD, this code doesn't happen yet */
ASSERT(FALSE);
}
}
} }
PMMADDRESS_NODE PMMADDRESS_NODE