mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
- Do not zero out MC_SYSTEM pages if they are "early pages" either. This could cause issues on certain systems where mapping the PFN database required "early pages", and they were zeroed before hyperspace was ready.
- Add a new flag to MmGetContigousPages to specify if these pages should be zeroed or not. Allows the nonpaged pool pages not to get automatically zeroed when allocated (the NP pool allocator can do this by itself later). This allows initial nonpaged pool to be allocated before hyperspace is ready. svn path=/trunk/; revision=41572
This commit is contained in:
parent
bb161e9df2
commit
fbca42cd9f
3 changed files with 8 additions and 5 deletions
|
@ -1125,7 +1125,8 @@ MmGetContinuousPages(
|
|||
ULONG NumberOfBytes,
|
||||
PHYSICAL_ADDRESS LowestAcceptableAddress,
|
||||
PHYSICAL_ADDRESS HighestAcceptableAddress,
|
||||
PHYSICAL_ADDRESS BoundaryAddressMultiple
|
||||
PHYSICAL_ADDRESS BoundaryAddressMultiple,
|
||||
BOOLEAN ZeroPages
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
|
|
@ -103,7 +103,8 @@ MmAllocateContiguousMemorySpecifyCache(IN SIZE_T NumberOfBytes,
|
|||
PBase = MmGetContinuousPages(NumberOfBytes,
|
||||
LowestAcceptableAddress,
|
||||
HighestAcceptableAddress,
|
||||
BoundaryAddressMultiple);
|
||||
BoundaryAddressMultiple,
|
||||
TRUE);
|
||||
if (PBase == 0)
|
||||
{
|
||||
MmLockAddressSpace(MmGetKernelAddressSpace());
|
||||
|
|
|
@ -138,7 +138,8 @@ NTAPI
|
|||
MmGetContinuousPages(ULONG NumberOfBytes,
|
||||
PHYSICAL_ADDRESS LowestAcceptableAddress,
|
||||
PHYSICAL_ADDRESS HighestAcceptableAddress,
|
||||
PHYSICAL_ADDRESS BoundaryAddressMultiple)
|
||||
PHYSICAL_ADDRESS BoundaryAddressMultiple,
|
||||
BOOLEAN ZeroPages)
|
||||
{
|
||||
ULONG NrPages;
|
||||
ULONG i, j;
|
||||
|
@ -222,7 +223,7 @@ MmGetContinuousPages(ULONG NumberOfBytes,
|
|||
{
|
||||
if (MiGetPfnEntry(i)->Flags.Zero == 0)
|
||||
{
|
||||
MiZeroPage(i);
|
||||
if (ZeroPages) MiZeroPage(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -727,7 +728,7 @@ MmAllocPage(ULONG Consumer, SWAPENTRY SwapEntry)
|
|||
/* Allocate an early page -- we'll account for it later */
|
||||
KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql);
|
||||
PfnOffset = MmAllocEarlyPage();
|
||||
MiZeroPage(PfnOffset);
|
||||
if (Consumer != MC_SYSTEM) MiZeroPage(PfnOffset);
|
||||
return PfnOffset;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue