Author: tkreuzer
Date: Sat May 16 20:10:03 2015
New Revision: 67785
URL:
http://svn.reactos.org/svn/reactos?rev=67785&view=rev
Log:
[NTOSKRNL]
Convert MEMORY_AREA::StartingAddress to StaringVpn
Modified:
trunk/reactos/ntoskrnl/cache/section/data.c
trunk/reactos/ntoskrnl/cache/section/fault.c
trunk/reactos/ntoskrnl/cache/section/swapout.c
trunk/reactos/ntoskrnl/include/internal/mm.h
trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
trunk/reactos/ntoskrnl/mm/marea.c
trunk/reactos/ntoskrnl/mm/rmap.c
trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/cache/section/data.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/dat…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] Sat May 16 20:10:03 2015
@@ -160,7 +160,7 @@
DPRINT("STATUS_NOT_MAPPED_DATA\n");
return STATUS_NOT_MAPPED_DATA;
}
- BeginningAddress = PAGE_ROUND_DOWN((ULONG_PTR)MemoryArea->StartingAddress);
+ BeginningAddress = PAGE_ROUND_DOWN(MA_GetStartingAddress(MemoryArea));
EndingAddress = PAGE_ROUND_UP((ULONG_PTR)MemoryArea->EndingAddress);
Segment = MemoryArea->Data.SectionData.Segment;
ViewOffset.QuadPart = MemoryArea->Data.SectionData.ViewOffset.QuadPart;
@@ -681,7 +681,7 @@
Process = MmGetAddressSpaceOwner(AddressSpace);
Address = (PVOID)PAGE_ROUND_DOWN(Address);
Segment = ContextData[1];
- Offset.QuadPart = (ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress +
+ Offset.QuadPart = (ULONG_PTR)Address - MA_GetStartingAddress(MemoryArea) +
MemoryArea->Data.SectionData.ViewOffset.QuadPart;
Entry = MmGetPageEntrySectionSegment(Segment, &Offset);
@@ -732,7 +732,7 @@
DPRINT("MmFreeMemoryArea(%p,%p)\n",
MmGetAddressSpaceOwner(AddressSpace),
- MemoryArea->StartingAddress);
+ MA_GetStartingAddress(MemoryArea));
MmLockAddressSpace(AddressSpace);
Modified: trunk/reactos/ntoskrnl/cache/section/fault.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/fau…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/fault.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/fault.c [iso-8859-1] Sat May 16 20:10:03 2015
@@ -122,7 +122,7 @@
DPRINT("Not Present: %p %p (%p-%p)\n",
AddressSpace,
Address,
- MemoryArea->StartingAddress,
+ MA_GetStartingAddress(MemoryArea),
MemoryArea->EndingAddress);
/*
@@ -138,7 +138,7 @@
PAddress = MM_ROUND_DOWN(Address, PAGE_SIZE);
TotalOffset.QuadPart = (ULONG_PTR)PAddress -
- (ULONG_PTR)MemoryArea->StartingAddress;
+ MA_GetStartingAddress(MemoryArea);
Segment = MemoryArea->Data.SectionData.Segment;
@@ -345,7 +345,7 @@
/* Find the offset of the page */
PAddress = MM_ROUND_DOWN(Address, PAGE_SIZE);
- Offset.QuadPart = (ULONG_PTR)PAddress - (ULONG_PTR)MemoryArea->StartingAddress +
+ Offset.QuadPart = (ULONG_PTR)PAddress - MA_GetStartingAddress(MemoryArea) +
MemoryArea->Data.SectionData.ViewOffset.QuadPart;
if (!Segment->WriteCopy /*&&
@@ -584,7 +584,7 @@
DPRINT("Type %x (%p -> %p)\n",
MemoryArea->Type,
- MemoryArea->StartingAddress,
+ MA_GetStartingAddress(MemoryArea),
MemoryArea->EndingAddress);
Resources.DoAcquisition = NULL;
@@ -660,7 +660,7 @@
DPRINT1("Completed page fault handling %Ix %x\n", Address, Status);
DPRINT1("Type %x (%p -> %p)\n",
MemoryArea->Type,
- MemoryArea->StartingAddress,
+ MA_GetStartingAddress(MemoryArea),
MemoryArea->EndingAddress);
}
@@ -788,7 +788,7 @@
DPRINTC("Type %x (%p -> %08Ix -> %p) in %p\n",
MemoryArea->Type,
- MemoryArea->StartingAddress,
+ MA_GetStartingAddress(MemoryArea),
Address,
MemoryArea->EndingAddress,
PsGetCurrentThread());
Modified: trunk/reactos/ntoskrnl/cache/section/swapout.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/swa…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/swapout.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/swapout.c [iso-8859-1] Sat May 16 20:10:03 2015
@@ -289,7 +289,8 @@
PMM_SECTION_SEGMENT Segment;
PVOID PAddress = MM_ROUND_DOWN(Address, PAGE_SIZE);
- TotalOffset.QuadPart = (ULONG_PTR)PAddress -
(ULONG_PTR)MemoryArea->StartingAddress +
+ TotalOffset.QuadPart = (ULONG_PTR)PAddress -
+ MA_GetStartingAddress(MemoryArea) +
MemoryArea->Data.SectionData.ViewOffset.QuadPart;
Segment = MemoryArea->Data.SectionData.Segment;
@@ -456,7 +457,7 @@
DPRINTC("Type %x (%p -> %p)\n",
MemoryArea->Type,
- MemoryArea->StartingAddress,
+ MA_GetStartingAddress(MemoryArea),
MemoryArea->EndingAddress);
Resources.DoAcquisition = NULL;
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:03 2015
@@ -199,9 +199,12 @@
};
} ROS_SECTION_OBJECT, *PROS_SECTION_OBJECT;
+#define MA_GetStartingAddress(_MemoryArea) ((_MemoryArea)->StartingVpn <<
PAGE_SHIFT)
+#define MA_GetEndingAddress(_MemoryArea) (((_MemoryArea)->EndingVpn + 1) <<
PAGE_SHIFT)
+
typedef struct _MEMORY_AREA
{
- ULONG_PTR StartingAddress;
+ ULONG_PTR StartingVpn;
ULONG_PTR EndingAddress;
struct _MEMORY_AREA *Parent;
struct _MEMORY_AREA *LeftChild;
Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Sat May 16 20:10:03 2015
@@ -1886,7 +1886,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("MmQuerySectionView failed. MemoryArea=%p (%p-%p),
BaseAddress=%p\n",
- MemoryArea, MemoryArea->StartingAddress,
MemoryArea->EndingAddress, BaseAddress);
+ MemoryArea, MA_GetStartingAddress(MemoryArea),
MemoryArea->EndingAddress, BaseAddress);
NT_ASSERT(NT_SUCCESS(Status));
}
}
@@ -5317,7 +5317,7 @@
Vad->u.VadFlags.CommitCharge -= CommitReduction;
// For ReactOS: shrink the corresponding memory area
MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace,
(PVOID)StartingAddress);
- ASSERT(Vad->StartingVpn << PAGE_SHIFT ==
MemoryArea->StartingAddress);
+ ASSERT(Vad->StartingVpn << PAGE_SHIFT ==
MA_GetStartingAddress(MemoryArea));
ASSERT((Vad->EndingVpn + 1) << PAGE_SHIFT ==
MemoryArea->EndingAddress);
Vad->EndingVpn = (StartingAddress - 1) >> PAGE_SHIFT;
MemoryArea->EndingAddress = StartingAddress;
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:03 2015
@@ -172,14 +172,14 @@
while (Node != NULL)
{
- if (Address < Node->StartingAddress)
+ if (Address < MA_GetStartingAddress(Node))
Node = Node->LeftChild;
else if (Address >= Node->EndingAddress)
Node = Node->RightChild;
else
{
DPRINT("MmLocateMemoryAreaByAddress(%p): %p [%p - %p]\n",
- Address, Node, Node->StartingAddress, Node->EndingAddress);
+ Address, Node, MA_GetStartingAddress(Node), Node->EndingAddress);
return Node;
}
}
@@ -207,11 +207,11 @@
Node != NULL;
Node = MmIterateNextNode(Node))
{
- if (Node->StartingAddress >= Address &&
- Node->StartingAddress < Extent)
+ if (MA_GetStartingAddress(Node) >= Address &&
+ MA_GetStartingAddress(Node) < Extent)
{
DPRINT("MmLocateMemoryAreaByRegion(%p - %p): %p - %p\n",
- Address, (ULONG_PTR)Address + Length, Node->StartingAddress,
+ Address, (ULONG_PTR)Address + Length, MA_GetStartingAddress(Node),
Node->EndingAddress);
return Node;
}
@@ -219,19 +219,19 @@
Node->EndingAddress < Extent)
{
DPRINT("MmLocateMemoryAreaByRegion(%p - %p): %p - %p\n",
- Address, (ULONG_PTR)Address + Length, Node->StartingAddress,
+ Address, (ULONG_PTR)Address + Length, MA_GetStartingAddress(Node),
Node->EndingAddress);
return Node;
}
- if (Node->StartingAddress <= Address &&
+ if (MA_GetStartingAddress(Node) <= Address &&
Node->EndingAddress >= Extent)
{
DPRINT("MmLocateMemoryAreaByRegion(%p - %p): %p - %p\n",
- Address, (ULONG_PTR)Address + Length, Node->StartingAddress,
+ Address, (ULONG_PTR)Address + Length, MA_GetStartingAddress(Node),
Node->EndingAddress);
return Node;
}
- if (Node->StartingAddress >= Extent)
+ if (MA_GetStartingAddress(Node) >= Extent)
{
DPRINT("Finished MmLocateMemoryAreaByRegion() = NULL\n");
return NULL;
@@ -387,13 +387,13 @@
Vad = ExAllocatePoolWithTag(NonPagedPool, sizeof(MMVAD), TAG_MVAD);
ASSERT(Vad);
RtlZeroMemory(Vad, sizeof(MMVAD));
- Vad->StartingVpn = PAGE_ROUND_DOWN(marea->StartingAddress) >>
PAGE_SHIFT;
+ Vad->StartingVpn = PAGE_ROUND_DOWN(MA_GetStartingAddress(marea)) >>
PAGE_SHIFT;
/*
* For some strange reason, it is perfectly valid to create a MAREA from 0x1000
to... 0x1000.
* In a normal OS/Memory Manager, this would be retarded, but ReactOS allows this
(how it works
* I don't even want to know).
*/
- if (marea->EndingAddress != marea->StartingAddress)
+ if (marea->EndingAddress != MA_GetStartingAddress(marea))
{
Vad->EndingVpn = PAGE_ROUND_DOWN((ULONG_PTR)marea->EndingAddress - 1)
>> PAGE_SHIFT;
}
@@ -424,16 +424,16 @@
do
{
DPRINT("marea->EndingAddress: %p Node->StartingAddress: %p\n",
- marea->EndingAddress, Node->StartingAddress);
+ marea->EndingAddress, MA_GetStartingAddress(Node));
DPRINT("marea->StartingAddress: %p Node->EndingAddress: %p\n",
- marea->StartingAddress, Node->EndingAddress);
- ASSERT(marea->EndingAddress <= Node->StartingAddress ||
- marea->StartingAddress >= Node->EndingAddress);
- ASSERT(marea->StartingAddress != Node->StartingAddress);
+ MA_GetStartingAddress(marea), Node->EndingAddress);
+ ASSERT(marea->EndingAddress <= MA_GetStartingAddress(Node) ||
+ MA_GetStartingAddress(marea) >= Node->EndingAddress);
+ ASSERT(MA_GetStartingAddress(marea) != MA_GetStartingAddress(Node));
PreviousNode = Node;
- if (marea->StartingAddress < Node->StartingAddress)
+ if (MA_GetStartingAddress(marea) < MA_GetStartingAddress(Node))
Node = Node->LeftChild;
else
Node = Node->RightChild;
@@ -452,7 +452,7 @@
marea->LeftChild = marea->RightChild = NULL;
marea->Parent = PreviousNode;
- if (marea->StartingAddress < PreviousNode->StartingAddress)
+ if (MA_GetStartingAddress(marea) < MA_GetStartingAddress(PreviousNode))
PreviousNode->LeftChild = marea;
else
PreviousNode->RightChild = marea;
@@ -499,7 +499,7 @@
while (Node && ((ULONG_PTR)Node->EndingAddress < HighestAddress))
{
/* Check if the memory area fits before the current node */
- if ((ULONG_PTR)Node->StartingAddress >= (Candidate + Length))
+ if (MA_GetStartingAddress(Node) >= (Candidate + Length))
{
DPRINT("MmFindGapBottomUp: %p\n", Candidate);
ASSERT(Candidate >= LowestAddress);
@@ -561,13 +561,13 @@
/* Go to the node with highest address in the tree. */
Node = Root ? MmIterateLastNode(Root) : NULL;
- while (Node && ((ULONG_PTR)Node->StartingAddress > HighestAddress))
+ while (Node && (MA_GetStartingAddress(Node) > HighestAddress))
{
Node = MmIteratePrevNode(Node);
}
/* Traverse the tree from high to low addresses */
- while (Node && ((ULONG_PTR)Node->StartingAddress > LowestAddress))
+ while (Node && (MA_GetStartingAddress(Node) > LowestAddress))
{
/* Check if the memory area fits after the current node */
if ((ULONG_PTR)Node->EndingAddress <= Candidate)
@@ -577,11 +577,11 @@
}
/* Calculate next possible adress below this node */
- Candidate = ALIGN_DOWN_BY((ULONG_PTR)Node->StartingAddress - Length,
+ Candidate = ALIGN_DOWN_BY(MA_GetStartingAddress(Node) - Length,
Granularity);
/* Check for overflow. */
- if (Candidate > (ULONG_PTR)Node->StartingAddress)
+ if (Candidate > MA_GetStartingAddress(Node))
return NULL;
/* Go to the next lower node */
@@ -630,10 +630,10 @@
/* Check some fields */
ASSERT(Node->Magic == 'erAM');
- ASSERT(PAGE_ALIGN(Node->StartingAddress) == (PVOID)Node->StartingAddress);
+ ASSERT(PAGE_ALIGN(MA_GetStartingAddress(Node)) ==
(PVOID)MA_GetStartingAddress(Node));
ASSERT(Node->EndingAddress != 0);
ASSERT(PAGE_ALIGN(Node->EndingAddress) == (PVOID)Node->EndingAddress);
- ASSERT(Node->StartingAddress < Node->EndingAddress);
+ ASSERT(MA_GetStartingAddress(Node) < Node->EndingAddress);
ASSERT((Node->Type == 0) ||
(Node->Type == MEMORY_AREA_CACHE) ||
// (Node->Type == MEMORY_AREA_CACHE_SEGMENT) ||
@@ -766,7 +766,7 @@
}
EndAddress = MM_ROUND_UP(MemoryArea->EndingAddress, PAGE_SIZE);
- for (Address = (ULONG_PTR)MemoryArea->StartingAddress;
+ for (Address = MA_GetStartingAddress(MemoryArea);
Address < (ULONG_PTR)EndAddress;
Address += PAGE_SIZE)
{
@@ -1008,7 +1008,7 @@
RtlZeroMemory(MemoryArea, sizeof(MEMORY_AREA));
MemoryArea->Type = Type;
- MemoryArea->StartingAddress = (ULONG_PTR)*BaseAddress;
+ MemoryArea->StartingVpn = (ULONG_PTR)*BaseAddress >> PAGE_SHIFT;
MemoryArea->EndingAddress = ((ULONG_PTR)*BaseAddress + tmpLength);
MemoryArea->Protect = Protect;
MemoryArea->Flags = AllocationFlags;
@@ -1049,14 +1049,14 @@
switch (MemoryArea->Type)
{
case MEMORY_AREA_SECTION_VIEW:
- Address = (PVOID)MemoryArea->StartingAddress;
+ Address = (PVOID)MA_GetStartingAddress(MemoryArea);
MmUnlockAddressSpace(&Process->Vm);
MmUnmapViewOfSection(Process, Address);
MmLockAddressSpace(&Process->Vm);
break;
case MEMORY_AREA_CACHE:
- Address = (PVOID)MemoryArea->StartingAddress;
+ Address = (PVOID)MA_GetStartingAddress(MemoryArea);
MmUnlockAddressSpace(&Process->Vm);
MmUnmapViewOfCacheSegment(&Process->Vm, Address);
MmLockAddressSpace(&Process->Vm);
Modified: trunk/reactos/ntoskrnl/mm/rmap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/rmap.c?rev=677…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/rmap.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/rmap.c [iso-8859-1] Sat May 16 20:10:03 2015
@@ -137,7 +137,7 @@
{
ULONG_PTR Entry;
Offset = MemoryArea->Data.SectionData.ViewOffset.QuadPart +
- ((ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress);
+ ((ULONG_PTR)Address - MA_GetStartingAddress(MemoryArea));
MmLockSectionSegment(MemoryArea->Data.SectionData.Segment);
Modified: trunk/reactos/ntoskrnl/mm/section.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Sat May 16 20:10:03 2015
@@ -1323,12 +1323,12 @@
}
PAddress = MM_ROUND_DOWN(Address, PAGE_SIZE);
- Offset.QuadPart = (ULONG_PTR)PAddress - (ULONG_PTR)MemoryArea->StartingAddress
+ Offset.QuadPart = (ULONG_PTR)PAddress - MA_GetStartingAddress(MemoryArea)
+ MemoryArea->Data.SectionData.ViewOffset.QuadPart;
Segment = MemoryArea->Data.SectionData.Segment;
Section = MemoryArea->Data.SectionData.Section;
- Region = MmFindRegion((PVOID)MemoryArea->StartingAddress,
+ Region = MmFindRegion((PVOID)MA_GetStartingAddress(MemoryArea),
&MemoryArea->Data.SectionData.RegionListHead,
Address, NULL);
ASSERT(Region != NULL);
@@ -1700,12 +1700,12 @@
* Find the offset of the page
*/
PAddress = MM_ROUND_DOWN(Address, PAGE_SIZE);
- Offset.QuadPart = (ULONG_PTR)PAddress - (ULONG_PTR)MemoryArea->StartingAddress
+ Offset.QuadPart = (ULONG_PTR)PAddress - MA_GetStartingAddress(MemoryArea)
+ MemoryArea->Data.SectionData.ViewOffset.QuadPart;
Segment = MemoryArea->Data.SectionData.Segment;
Section = MemoryArea->Data.SectionData.Section;
- Region = MmFindRegion((PVOID)MemoryArea->StartingAddress,
+ Region = MmFindRegion((PVOID)MA_GetStartingAddress(MemoryArea),
&MemoryArea->Data.SectionData.RegionListHead,
Address, NULL);
ASSERT(Region != NULL);
@@ -1895,7 +1895,7 @@
Context.SectionEntry = Entry;
Context.CallingProcess = Process;
- Context.Offset.QuadPart = (ULONG_PTR)Address -
(ULONG_PTR)MemoryArea->StartingAddress
+ Context.Offset.QuadPart = (ULONG_PTR)Address - MA_GetStartingAddress(MemoryArea)
+ MemoryArea->Data.SectionData.ViewOffset.QuadPart;
DirectMapped = FALSE;
@@ -2294,7 +2294,7 @@
Address = (PVOID)PAGE_ROUND_DOWN(Address);
- Offset.QuadPart = (ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress
+ Offset.QuadPart = (ULONG_PTR)Address - MA_GetStartingAddress(MemoryArea)
+ MemoryArea->Data.SectionData.ViewOffset.QuadPart;
/*
@@ -2478,7 +2478,7 @@
ULONG_PTR Entry;
PFN_NUMBER Page;
- Offset.QuadPart = (ULONG_PTR)Address -
(ULONG_PTR)MemoryArea->StartingAddress
+ Offset.QuadPart = (ULONG_PTR)Address - MA_GetStartingAddress(MemoryArea)
+ MemoryArea->Data.SectionData.ViewOffset.QuadPart;
Entry = MmGetPageEntrySectionSegment(Segment, &Offset);
/*
@@ -2524,7 +2524,7 @@
if (Length > MaxLength)
Length = (ULONG)MaxLength;
- Region = MmFindRegion((PVOID)MemoryArea->StartingAddress,
+ Region = MmFindRegion((PVOID)MA_GetStartingAddress(MemoryArea),
&MemoryArea->Data.SectionData.RegionListHead,
BaseAddress, NULL);
ASSERT(Region != NULL);
@@ -2536,7 +2536,7 @@
}
*OldProtect = Region->Protect;
- Status = MmAlterRegion(AddressSpace, (PVOID)MemoryArea->StartingAddress,
+ Status = MmAlterRegion(AddressSpace, (PVOID)MA_GetStartingAddress(MemoryArea),
&MemoryArea->Data.SectionData.RegionListHead,
BaseAddress, Length, Region->Type, Protect,
MmAlterViewAttributes);
@@ -2555,7 +2555,7 @@
PROS_SECTION_OBJECT Section;
PMM_SECTION_SEGMENT Segment;
- Region = MmFindRegion((PVOID)MemoryArea->StartingAddress,
+ Region = MmFindRegion((PVOID)MA_GetStartingAddress(MemoryArea),
&MemoryArea->Data.SectionData.RegionListHead,
Address, &RegionBaseAddress);
if (Region == NULL)
@@ -2567,12 +2567,12 @@
if (Section->AllocationAttributes & SEC_IMAGE)
{
Segment = MemoryArea->Data.SectionData.Segment;
- Info->AllocationBase = (PUCHAR)MemoryArea->StartingAddress -
Segment->Image.VirtualAddress;
+ Info->AllocationBase = (PUCHAR)MA_GetStartingAddress(MemoryArea) -
Segment->Image.VirtualAddress;
Info->Type = MEM_IMAGE;
}
else
{
- Info->AllocationBase = (PVOID)MemoryArea->StartingAddress;
+ Info->AllocationBase = (PVOID)MA_GetStartingAddress(MemoryArea);
Info->Type = MEM_MAPPED;
}
Info->BaseAddress = RegionBaseAddress;
@@ -4008,7 +4008,7 @@
Address = (PVOID)PAGE_ROUND_DOWN(Address);
- Offset.QuadPart = ((ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress) +
+ Offset.QuadPart = ((ULONG_PTR)Address - MA_GetStartingAddress(MemoryArea)) +
MemoryArea->Data.SectionData.ViewOffset.QuadPart;
Section = MemoryArea->Data.SectionData.Section;