mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 12:23:30 +00:00
[NTVDM]: Add a diagnostic dprint to check why some apps seem to fail allocating memory.
svn path=/trunk/; revision=69203
This commit is contained in:
@@ -228,6 +228,7 @@ Done:
|
||||
/* 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 @@ BOOLEAN DosResizeMemory(WORD BlockData, WORD NewSize, WORD *MaxAvailable)
|
||||
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 @@ Done:
|
||||
/* 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 @@ BOOLEAN DosFreeMemory(WORD BlockData)
|
||||
PDOS_MCB Mcb = SEGMENT_TO_MCB(BlockData - 1);
|
||||
|
||||
DPRINT("DosFreeMemory: BlockData 0x%04X\n", BlockData);
|
||||
|
||||
if (BlockData == 0)
|
||||
{
|
||||
Sda->LastErrorCode = ERROR_INVALID_BLOCK;
|
||||
|
||||
Reference in New Issue
Block a user