Looks like a nice catch to me.
mjmartin
From: vicmarcal@hotmail.com
To: ros-dev@reactos.org
Date: Thu, 23 Dec 2010 04:08:03 +0000
Subject: [ros-dev] [ros-diffs] [fireball] 50108: [NTOS] - Fix memory region size calculation in MemoryBasicInformation in certain cases
I have a doubt:
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Wed Dec 22 21:59:27 2010
@@ -2446,6 +2446,9 @@
/* Check if this VAD is too high */
if (BaseVpn < Vad->StartingVpn)
{
+ /* Stop if there is no left child */
+ if (!Vad->LeftChild) break;
+
/* Search on the left next */
Vad = Vad->LeftChild;
}
@@ -2453,6 +2456,11 @@
{
/* Then this VAD is too low, keep searching on the right */
ASSERT(BaseVpn > Vad->EndingVpn);
+
+ /* Stop if there is no right child */
+ if (!Vad->LeftChild) break;
+
+ /* Search on the right next */
Vad = Vad->RightChild;
}
}
========================================================
Look these lines:
+ /* Stop if there is no left child */
+ if (!Vad->LeftChild) break;
+ /* Stop if there is no right child */
+ if (!Vad->LeftChild) break;
1) Is there a typo in the copy-pasta condition?
2) Is the comment wrong or misleading?
3) Am I a complete noob?
I think the order is 3), 1), 2)
One of the latest changes has made ReactOS totally uninstallable(12 tries /12 fails) using less than 192MB Ram.It halts in first stage during copying files.
Merry Christmas!!
_______________________________________________ Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev