MiInsertVad(IN PMMVAD Vad,
IN PEPROCESS Process);
-ULONG
-NTAPI
-MiMakeProtectionMask(
- IN ULONG Protect
-);
-
static VOID
MmInsertMemoryArea(
PMMSUPPORT AddressSpace,
}
Vad->u.VadFlags.Spare = 1;
Vad->u.VadFlags.PrivateMemory = 1;
- Vad->u.VadFlags.Protection = MiMakeProtectionMask(marea->Protect);
MiInsertVad(Vad, MmGetAddressSpaceOwner(AddressSpace));
marea->Vad = Vad;
}
break;
AlignedAddress = MM_ROUND_UP(PreviousNode->EndingAddress, Granularity);
- if (AlignedAddress >= LowestAddress)
+ if (Node->StartingAddress > AlignedAddress &&
+ (ULONG_PTR)Node->StartingAddress - (ULONG_PTR)AlignedAddress >= Length)
{
- if (Node->StartingAddress > AlignedAddress &&
- (ULONG_PTR)Node->StartingAddress - (ULONG_PTR)AlignedAddress >= Length)
- {
- DPRINT("MmFindGapBottomUp: %p\n", AlignedAddress);
- ASSERT(AlignedAddress >= LowestAddress);
- return AlignedAddress;
- }
+ DPRINT("MmFindGapBottomUp: %p\n", AlignedAddress);
+ return AlignedAddress;
}
+
PreviousNode = Node;
}
(ULONG_PTR)HighestAddress - (ULONG_PTR)AlignedAddress >= Length)
{
DPRINT("MmFindGapBottomUp: %p\n", AlignedAddress);
- ASSERT(AlignedAddress >= LowestAddress);
return AlignedAddress;
}
(ULONG_PTR)FirstNode->StartingAddress - (ULONG_PTR)AlignedAddress >= Length)
{
DPRINT("MmFindGapBottomUp: %p\n", AlignedAddress);
- ASSERT(AlignedAddress >= LowestAddress);
return AlignedAddress;
}