mirror of
https://github.com/reactos/reactos.git
synced 2024-08-04 10:30:59 +00:00
[NTVDM]
Fix the VDM DOS memory manager to use the segment of the data portion of the block, rather than the MCB itself. svn path=/branches/ntvdm/; revision=59338
This commit is contained in:
parent
5db2a4a6dd
commit
6d45f4e6e3
|
@ -148,12 +148,13 @@ Next:
|
|||
/* Take ownership of the block */
|
||||
CurrentMcb->OwnerPsp = CurrentPsp;
|
||||
|
||||
return Result;
|
||||
/* Return the segment of the data portion of the block */
|
||||
return Result + 1;
|
||||
}
|
||||
|
||||
WORD DosResizeMemory(WORD Segment, WORD NewSize)
|
||||
WORD DosResizeMemory(WORD BlockData, WORD NewSize)
|
||||
{
|
||||
WORD ReturnSize = 0, NextSegment;
|
||||
WORD Segment = BlockData - 1, ReturnSize = 0, NextSegment;
|
||||
PDOS_MCB Mcb = SEGMENT_TO_MCB(Segment), NextMcb;
|
||||
|
||||
/* Make sure this is a valid, allocated block */
|
||||
|
@ -222,9 +223,9 @@ WORD DosResizeMemory(WORD Segment, WORD NewSize)
|
|||
return ReturnSize;
|
||||
}
|
||||
|
||||
BOOLEAN DosFreeMemory(WORD Segment)
|
||||
BOOLEAN DosFreeMemory(WORD BlockData)
|
||||
{
|
||||
PDOS_MCB Mcb = SEGMENT_TO_MCB(Segment);
|
||||
PDOS_MCB Mcb = SEGMENT_TO_MCB(BlockData - 1);
|
||||
|
||||
/* Make sure the MCB is valid */
|
||||
if (Mcb->BlockType != 'M' && Mcb->BlockType != 'Z') return FALSE;
|
||||
|
|
|
@ -207,8 +207,8 @@ VOID BiosUpdateConsole(ULONG StartAddress, ULONG EndAddress);
|
|||
VOID BiosPrintCharacter(CHAR Character, BYTE Attribute);
|
||||
BOOLEAN DosInitialize();
|
||||
WORD DosAllocateMemory(WORD Size, WORD *MaxAvailable);
|
||||
BOOLEAN DosFreeMemory(WORD Segment);
|
||||
WORD DosResizeMemory(WORD Segment, WORD NewSize);
|
||||
BOOLEAN DosFreeMemory(WORD BlockData);
|
||||
WORD DosResizeMemory(WORD BlockData, WORD NewSize);
|
||||
BOOLEAN DosCreateProcess(LPCSTR CommandLine, WORD EnvBlock);
|
||||
VOID DosInt20h(WORD CodeSegment);
|
||||
VOID DosInt21h(WORD CodeSegment);
|
||||
|
|
Loading…
Reference in a new issue