mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
[NTOSKRNL]
Add an MMVAD to the MEMORY_AREA structure, instead of allocating a new one to synchronize with the process VAD tree svn path=/trunk/; revision=67787
This commit is contained in:
parent
5280b4e3c6
commit
595df76091
|
@ -204,6 +204,7 @@ typedef struct _ROS_SECTION_OBJECT
|
|||
|
||||
typedef struct _MEMORY_AREA
|
||||
{
|
||||
MMVAD VadNode;
|
||||
ULONG_PTR StartingVpn;
|
||||
ULONG_PTR EndingVpn;
|
||||
struct _MEMORY_AREA *Parent;
|
||||
|
|
|
@ -384,8 +384,8 @@ MmInsertMemoryArea(
|
|||
PMMVAD Vad;
|
||||
|
||||
ASSERT(marea->Type == MEMORY_AREA_SECTION_VIEW || marea->Type == MEMORY_AREA_CACHE);
|
||||
Vad = ExAllocatePoolWithTag(NonPagedPool, sizeof(MMVAD), TAG_MVAD);
|
||||
ASSERT(Vad);
|
||||
Vad = &marea->VadNode;
|
||||
|
||||
RtlZeroMemory(Vad, sizeof(MMVAD));
|
||||
Vad->StartingVpn = PAGE_ROUND_DOWN(MA_GetStartingAddress(marea)) >> PAGE_SHIFT;
|
||||
/*
|
||||
|
@ -825,7 +825,6 @@ MmFreeMemoryArea(
|
|||
MiRemoveNode(MemoryArea->Vad, &Process->VadRoot);
|
||||
}
|
||||
|
||||
ExFreePoolWithTag(MemoryArea->Vad, TAG_MVAD);
|
||||
MemoryArea->Vad = NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue