[ros-dev] [ros-diffs] [fireball] 50108: [NTOS] - Fix memory region size calculation in MemoryBasicInformation in certain cases

victor martinez vicmarcal at hotmail.com
Thu Dec 23 04:08:03 UTC 2010


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!!


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.reactos.org/pipermail/ros-dev/attachments/20101223/fa355960/attachment.htm>


More information about the Ros-dev mailing list