mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
[NTOSKRNL]
Use 1 as base address parameter to MmCreateMemoryArea, when 0 is the actual base and remove FixedAddress parameter in MmCreateMemoryArea svn path=/trunk/; revision=67790
This commit is contained in:
parent
d2818e587c
commit
cf491f89ab
1
reactos/ntoskrnl/cache/section/data.c
vendored
1
reactos/ntoskrnl/cache/section/data.c
vendored
|
@ -551,7 +551,6 @@ _MiMapViewOfSegment(PMMSUPPORT AddressSpace,
|
|||
ViewSize,
|
||||
Protect,
|
||||
&MArea,
|
||||
FALSE,
|
||||
AllocationType,
|
||||
*BaseAddress ?
|
||||
PAGE_SIZE : MM_ALLOCATION_GRANULARITY);
|
||||
|
|
|
@ -595,7 +595,6 @@ CcRosMapVacb(
|
|||
VACB_MAPPING_GRANULARITY,
|
||||
PAGE_READWRITE,
|
||||
(PMEMORY_AREA*)&Vacb->MemoryArea,
|
||||
FALSE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
MmUnlockAddressSpace(MmGetKernelAddressSpace());
|
||||
|
|
|
@ -487,7 +487,6 @@ MmCreateMemoryArea(
|
|||
SIZE_T Length,
|
||||
ULONG Protection,
|
||||
PMEMORY_AREA *Result,
|
||||
BOOLEAN FixedAddress,
|
||||
ULONG AllocationFlags,
|
||||
ULONG AllocationGranularity
|
||||
);
|
||||
|
|
|
@ -38,7 +38,6 @@ MiRosTakeOverSharedUserPage(IN PEPROCESS Process)
|
|||
PAGE_SIZE,
|
||||
PAGE_READWRITE,
|
||||
&MemoryArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(NT_SUCCESS(Status));
|
||||
|
|
|
@ -146,13 +146,19 @@ MiInsertNode(IN PMM_AVL_TABLE Table,
|
|||
PVOID AllocatedBase = (PVOID)(Vad->StartingVpn << PAGE_SHIFT);
|
||||
|
||||
Size = ((Vad->EndingVpn + 1) - Vad->StartingVpn) << PAGE_SHIFT;
|
||||
|
||||
if (AllocatedBase == NULL)
|
||||
{
|
||||
AllocatedBase = (PVOID)(ULONG_PTR)1;
|
||||
Size -= 1;
|
||||
}
|
||||
|
||||
Status = MmCreateMemoryArea(&Process->Vm,
|
||||
MEMORY_AREA_OWNED_BY_ARM3,
|
||||
&AllocatedBase,
|
||||
Size,
|
||||
PAGE_READWRITE,
|
||||
&MemoryArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(NT_SUCCESS(Status));
|
||||
|
|
|
@ -923,7 +923,6 @@ MmCreateMemoryArea(PMMSUPPORT AddressSpace,
|
|||
ULONG_PTR Length,
|
||||
ULONG Protect,
|
||||
PMEMORY_AREA *Result,
|
||||
BOOLEAN FixedAddress,
|
||||
ULONG AllocationFlags,
|
||||
ULONG Granularity)
|
||||
{
|
||||
|
@ -933,11 +932,11 @@ MmCreateMemoryArea(PMMSUPPORT AddressSpace,
|
|||
|
||||
DPRINT("MmCreateMemoryArea(Type 0x%lx, BaseAddress %p, "
|
||||
"*BaseAddress %p, Length %p, AllocationFlags %x, "
|
||||
"FixedAddress %x, Result %p)\n",
|
||||
"Result %p)\n",
|
||||
Type, BaseAddress, *BaseAddress, Length, AllocationFlags,
|
||||
FixedAddress, Result);
|
||||
Result);
|
||||
|
||||
if ((*BaseAddress) == 0 && !FixedAddress)
|
||||
if (*BaseAddress == 0)
|
||||
{
|
||||
tmpLength = (ULONG_PTR)MM_ROUND_UP(Length, PAGE_SIZE);
|
||||
*BaseAddress = MmFindGap(AddressSpace,
|
||||
|
|
|
@ -57,7 +57,6 @@ MiInitSystemMemoryAreas()
|
|||
MmBootImageSize,
|
||||
PAGE_EXECUTE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -72,7 +71,6 @@ MiInitSystemMemoryAreas()
|
|||
PTE_TOP - PTE_BASE + 1,
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -87,7 +85,6 @@ MiInitSystemMemoryAreas()
|
|||
HYPER_SPACE_END - HYPER_SPACE + 1,
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -102,7 +99,6 @@ MiInitSystemMemoryAreas()
|
|||
(MxPfnAllocation << PAGE_SHIFT),
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -117,7 +113,6 @@ MiInitSystemMemoryAreas()
|
|||
MmSizeOfNonPagedPoolInBytes,
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -132,7 +127,6 @@ MiInitSystemMemoryAreas()
|
|||
MiNonPagedSystemSize,
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -147,7 +141,6 @@ MiInitSystemMemoryAreas()
|
|||
MmSystemViewSize,
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -163,7 +156,6 @@ MiInitSystemMemoryAreas()
|
|||
(ULONG_PTR)MmSessionBase,
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -178,7 +170,6 @@ MiInitSystemMemoryAreas()
|
|||
MmSizeOfPagedPoolInBytes,
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -193,7 +184,6 @@ MiInitSystemMemoryAreas()
|
|||
PAGE_SIZE * KeNumberProcessors,
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -208,7 +198,6 @@ MiInitSystemMemoryAreas()
|
|||
PAGE_SIZE,
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -223,7 +212,6 @@ MiInitSystemMemoryAreas()
|
|||
PAGE_SIZE,
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
@ -239,7 +227,6 @@ MiInitSystemMemoryAreas()
|
|||
PAGE_SIZE * 2,
|
||||
PAGE_READWRITE,
|
||||
&MArea,
|
||||
TRUE,
|
||||
0,
|
||||
PAGE_SIZE);
|
||||
ASSERT(Status == STATUS_SUCCESS);
|
||||
|
|
|
@ -3965,7 +3965,6 @@ MmMapViewOfSegment(PMMSUPPORT AddressSpace,
|
|||
ViewSize,
|
||||
Protect,
|
||||
&MArea,
|
||||
FALSE,
|
||||
AllocationType,
|
||||
Granularity);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
Loading…
Reference in a new issue