Author: tkreuzer Date: Sun Aug 29 08:35:54 2010 New Revision: 48642
URL: http://svn.reactos.org/svn/reactos?rev=48642&view=rev Log: [NTOSKRNL] Modified version of r48640: - update the NodeHint to the root node when deleting a node - remove this code from MmCleanProcessAddressSpace
Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/procsup.c?... ============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Sun Aug 29 08:35:54 2010 @@ -1164,18 +1164,9 @@
/* Remove this VAD from the tree */ ASSERT(VadTree->NumberGenericTableElements >= 1); - DPRINT("Removing node for VAD: %lx %lx\n", Vad->StartingVpn, Vad->EndingVpn); MiRemoveNode((PMMADDRESS_NODE)Vad, VadTree); DPRINT("Moving on: %d\n", VadTree->NumberGenericTableElements);
- /* Check if this VAD was the hint */ - if (VadTree->NodeHint == Vad) - { - /* Get a new hint, unless we're empty now, in which case nothing */ - VadTree->NodeHint = VadTree->BalancedRoot.RightChild; - if (!VadTree->NumberGenericTableElements) VadTree->NodeHint = NULL; - } - /* Only PEB/TEB VADs supported for now */ ASSERT(Vad->u.VadFlags.PrivateMemory == 1); ASSERT(Vad->u.VadFlags.VadType == VadNone);
Modified: trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c?... ============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c [iso-8859-1] Sun Aug 29 08:35:54 2010 @@ -108,11 +108,21 @@ MiRemoveNode(IN PMMADDRESS_NODE Node, IN PMM_AVL_TABLE Table) { + DPRINT("Removing address node: %lx %lx\n", Node->StartingVpn, Node->EndingVpn); + /* Call the AVL code */ RtlpDeleteAvlTreeNode(Table, Node);
/* Decrease element count */ Table->NumberGenericTableElements--; + + /* Check if this node was the hint */ + if (Table->NodeHint == Node) + { + /* Get a new hint, unless we're empty now, in which case nothing */ + if (!Table->NumberGenericTableElements) Table->NodeHint = NULL; + else Table->NodeHint = Table->BalancedRoot.RightChild; + } }
PMMADDRESS_NODE