Author: tkreuzer
Date: Sat May 16 20:10:41 2015
New Revision: 67787
URL:
http://svn.reactos.org/svn/reactos?rev=67787&view=rev
Log:
[NTOSKRNL]
Add an MMVAD to the MEMORY_AREA structure, instead of allocating a new one to synchronize
with the process VAD tree
Modified:
trunk/reactos/ntoskrnl/include/internal/mm.h
trunk/reactos/ntoskrnl/mm/marea.c
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Sat May 16 20:10:41 2015
@@ -204,6 +204,7 @@
typedef struct _MEMORY_AREA
{
+ MMVAD VadNode;
ULONG_PTR StartingVpn;
ULONG_PTR EndingVpn;
struct _MEMORY_AREA *Parent;
Modified: trunk/reactos/ntoskrnl/mm/marea.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=67…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Sat May 16 20:10:41 2015
@@ -384,8 +384,8 @@
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 @@
MiRemoveNode(MemoryArea->Vad, &Process->VadRoot);
}
- ExFreePoolWithTag(MemoryArea->Vad, TAG_MVAD);
MemoryArea->Vad = NULL;
}
}