mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user