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
typedef struct _MEMORY_AREA
{
typedef struct _MEMORY_AREA
{
ULONG_PTR StartingVpn;
ULONG_PTR EndingVpn;
struct _MEMORY_AREA *Parent;
ULONG_PTR StartingVpn;
ULONG_PTR EndingVpn;
struct _MEMORY_AREA *Parent;
PMMVAD Vad;
ASSERT(marea->Type == MEMORY_AREA_SECTION_VIEW || marea->Type == MEMORY_AREA_CACHE);
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;
/*
RtlZeroMemory(Vad, sizeof(MMVAD));
Vad->StartingVpn = PAGE_ROUND_DOWN(MA_GetStartingAddress(marea)) >> PAGE_SHIFT;
/*
MiRemoveNode(MemoryArea->Vad, &Process->VadRoot);
}
MiRemoveNode(MemoryArea->Vad, &Process->VadRoot);
}
- ExFreePoolWithTag(MemoryArea->Vad, TAG_MVAD);
MemoryArea->Vad = NULL;
}
}
MemoryArea->Vad = NULL;
}
}