Author: jgardou
Date: Thu Aug 4 18:23:20 2011
New Revision: 53064
URL:
http://svn.reactos.org/svn/reactos?rev=53064&view=rev
Log:
[NTOSKRNL/MM]
- Actually, there is no need to crawl the entire tree, just going past the limit is
enough. Thanks Timo.
- Fix MSVC warning, thanks Ged.
Now you have correct AND optimized code, Alex AND Timo should be happy.
I'm only the committer of these fix, the work was mostly done by Thomas Faber and Alex
Ionescu.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/vadnode.c
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] Thu Aug 4 18:23:20 2011
@@ -393,10 +393,11 @@
/* Calculate the initial upper margin */
HighVpn = BoundaryAddress >> PAGE_SHIFT;
- /* Starting from the root, go down until the right-most child,
- trying to stay below the boundary. */
+ /* Starting from the root, go down until the right-most child
+ * which is just behind the boundary*/
LowestNode = Node = RtlRightChildAvl(&Table->BalancedRoot);
- while ((Child = RtlRightChildAvl(Node))) Node = Child;
+ while (((Child = RtlRightChildAvl(Node)) != 0 )
+ && (Node->EndingVpn < HighVpn )) Node = Child;
/* Now loop the Vad nodes */
while (Node)