[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:
Timo Kreuzer 2015-05-16 20:10:41 +00:00
parent 5280b4e3c6
commit 595df76091
2 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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;
}
}