mirror of
https://github.com/reactos/reactos.git
synced 2024-08-26 13:18:51 +00:00
[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. svn path=/trunk/; revision=53064
This commit is contained in:
parent
20087fcf26
commit
e2c053a307
|
@ -393,10 +393,11 @@ MiFindEmptyAddressRangeDownTree(IN SIZE_T Length,
|
||||||
/* Calculate the initial upper margin */
|
/* Calculate the initial upper margin */
|
||||||
HighVpn = BoundaryAddress >> PAGE_SHIFT;
|
HighVpn = BoundaryAddress >> PAGE_SHIFT;
|
||||||
|
|
||||||
/* Starting from the root, go down until the right-most child,
|
/* Starting from the root, go down until the right-most child
|
||||||
trying to stay below the boundary. */
|
* which is just behind the boundary*/
|
||||||
LowestNode = Node = RtlRightChildAvl(&Table->BalancedRoot);
|
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 */
|
/* Now loop the Vad nodes */
|
||||||
while (Node)
|
while (Node)
|
||||||
|
|
Loading…
Reference in a new issue