mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:52:59 +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
2 changed files with 3 additions and 3 deletions
|
@ -204,6 +204,7 @@ typedef struct _ROS_SECTION_OBJECT
|
||||||
|
|
||||||
typedef struct _MEMORY_AREA
|
typedef struct _MEMORY_AREA
|
||||||
{
|
{
|
||||||
|
MMVAD VadNode;
|
||||||
ULONG_PTR StartingVpn;
|
ULONG_PTR StartingVpn;
|
||||||
ULONG_PTR EndingVpn;
|
ULONG_PTR EndingVpn;
|
||||||
struct _MEMORY_AREA *Parent;
|
struct _MEMORY_AREA *Parent;
|
||||||
|
|
|
@ -384,8 +384,8 @@ MmInsertMemoryArea(
|
||||||
PMMVAD Vad;
|
PMMVAD Vad;
|
||||||
|
|
||||||
ASSERT(marea->Type == MEMORY_AREA_SECTION_VIEW || marea->Type == MEMORY_AREA_CACHE);
|
ASSERT(marea->Type == MEMORY_AREA_SECTION_VIEW || marea->Type == MEMORY_AREA_CACHE);
|
||||||
Vad = ExAllocatePoolWithTag(NonPagedPool, sizeof(MMVAD), TAG_MVAD);
|
Vad = &marea->VadNode;
|
||||||
ASSERT(Vad);
|
|
||||||
RtlZeroMemory(Vad, sizeof(MMVAD));
|
RtlZeroMemory(Vad, sizeof(MMVAD));
|
||||||
Vad->StartingVpn = PAGE_ROUND_DOWN(MA_GetStartingAddress(marea)) >> PAGE_SHIFT;
|
Vad->StartingVpn = PAGE_ROUND_DOWN(MA_GetStartingAddress(marea)) >> PAGE_SHIFT;
|
||||||
/*
|
/*
|
||||||
|
@ -825,7 +825,6 @@ MmFreeMemoryArea(
|
||||||
MiRemoveNode(MemoryArea->Vad, &Process->VadRoot);
|
MiRemoveNode(MemoryArea->Vad, &Process->VadRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePoolWithTag(MemoryArea->Vad, TAG_MVAD);
|
|
||||||
MemoryArea->Vad = NULL;
|
MemoryArea->Vad = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue