Author: hbelusca
Date: Sat Sep 12 18:13:53 2015
New Revision: 69203

URL: http://svn.reactos.org/svn/reactos?rev=69203&view=rev
Log:
[NTVDM]: Add a diagnostic dprint to check why some apps seem to fail allocating 
memory.

Modified:
    trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c

Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c?rev=69203&r1=69202&r2=69203&view=diff
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c  [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c  [iso-8859-1] 
Sat Sep 12 18:13:53 2015
@@ -228,6 +228,7 @@
     /* If we didn't find a free block, bail out */
     if (Result == 0)
     {
+        DPRINT("DosAllocateMemory FAILED. Maximum available: 0x%04X\n", 
MaxSize);
         Sda->LastErrorCode = ERROR_NOT_ENOUGH_MEMORY;
         if (MaxAvailable) *MaxAvailable = MaxSize;
         return 0;
@@ -380,7 +381,7 @@
     else if (NewSize < Mcb->Size)
     {
         DPRINT("Shrinking block from 0x%04X to 0x%04X\n",
-                Mcb->Size, NewSize);
+               Mcb->Size, NewSize);
 
         /* Just split the block */
         NextSegment = Segment + NewSize + 1;
@@ -401,8 +402,7 @@
     /* Check if the operation failed */
     if (!Success)
     {
-        DPRINT("DosResizeMemory FAILED. Maximum available: 0x%04X\n",
-               ReturnSize);
+        DPRINT("DosResizeMemory FAILED. Maximum available: 0x%04X\n", 
ReturnSize);
 
         /* Return the maximum possible size */
         if (MaxAvailable) *MaxAvailable = ReturnSize;
@@ -418,6 +418,7 @@
     PDOS_MCB Mcb = SEGMENT_TO_MCB(BlockData - 1);
 
     DPRINT("DosFreeMemory: BlockData 0x%04X\n", BlockData);
+
     if (BlockData == 0)
     {
         Sda->LastErrorCode = ERROR_INVALID_BLOCK;


Reply via email to