Rename LOADER_MEMORY_MAPPING structure to more meaningful LOADER_MEMORY_DESCRIPTOR

This commit is contained in:
2024-05-23 19:00:50 +02:00
parent 143803aad9
commit 5221db2e63
7 changed files with 17 additions and 17 deletions

View File

@@ -10,7 +10,7 @@
/* Biggest free memory descriptor */
PLOADER_MEMORY_MAPPING MmFreeDescriptor;
PLOADER_MEMORY_DESCRIPTOR MmFreeDescriptor;
/* Highest physical page number */
ULONG_PTR MmHighestPhysicalPage;
@@ -22,7 +22,7 @@ ULONG_PTR MmLowestPhysicalPage = -1;
ULONG MmNumberOfPhysicalPages;
/* Old biggest free memory descriptor */
LOADER_MEMORY_MAPPING MmOldFreeDescriptor;
LOADER_MEMORY_DESCRIPTOR MmOldFreeDescriptor;
/* Page Map Level */
ULONG MmPageMapLevel;
@@ -31,7 +31,7 @@ ULONG MmPageMapLevel;
UCHAR MmProcessorStructuresData[MAXIMUM_PROCESSORS][KPROCESSOR_STRUCTURES_SIZE] = {0};
/* Allocation descriptors dedicated for HAL */
LOADER_MEMORY_MAPPING MmpHalAllocationDescriptors[MM_HAL_ALLOCATION_DESCRIPTORS];
LOADER_MEMORY_DESCRIPTOR MmpHalAllocationDescriptors[MM_HAL_ALLOCATION_DESCRIPTORS];
/* Live address of kernel HAL heap */
PVOID MmpHalHeapStart = MM_HAL_HEAP_START_ADDRESS;

View File

@@ -31,7 +31,7 @@ MmAllocateHalMemory(IN PFN_NUMBER PageCount,
IN BOOLEAN Aligned,
OUT PULONG_PTR Buffer)
{
PLOADER_MEMORY_MAPPING Descriptor, ExtraDescriptor, HalDescriptor;
PLOADER_MEMORY_DESCRIPTOR Descriptor, ExtraDescriptor, HalDescriptor;
PFN_NUMBER Alignment, MaxPage;
ULONGLONG PhysicalAddress;
PLIST_ENTRY ListEntry;
@@ -53,7 +53,7 @@ MmAllocateHalMemory(IN PFN_NUMBER PageCount,
ListEntry = KeInitializationBlock->MemoryDescriptorListHead.Flink;
while(ListEntry != &KeInitializationBlock->MemoryDescriptorListHead)
{
Descriptor = CONTAIN_RECORD(ListEntry, LOADER_MEMORY_MAPPING, ListEntry);
Descriptor = CONTAIN_RECORD(ListEntry, LOADER_MEMORY_DESCRIPTOR, ListEntry);
/* Align memory to 64KB if needed */
Alignment = Aligned ? (((Descriptor->BasePage + 0x0F) & ~0x0F) - Descriptor->BasePage) : 0;

View File

@@ -64,7 +64,7 @@ XTAPI
VOID
MmpScanMemoryDescriptors(VOID)
{
PLOADER_MEMORY_MAPPING MemoryDescriptor;
PLOADER_MEMORY_DESCRIPTOR MemoryDescriptor;
PLIST_ENTRY MemoryMappings;
PFN_NUMBER FreePages;
@@ -76,7 +76,7 @@ MmpScanMemoryDescriptors(VOID)
while(MemoryMappings != &KeInitializationBlock->MemoryDescriptorListHead)
{
/* Get memory descriptor */
MemoryDescriptor = CONTAIN_RECORD(MemoryMappings, LOADER_MEMORY_MAPPING, ListEntry);
MemoryDescriptor = CONTAIN_RECORD(MemoryMappings, LOADER_MEMORY_DESCRIPTOR, ListEntry);
/* Check if memory type is invisible or cached */
if(MmpVerifyMemoryTypeInvisible(MemoryDescriptor->MemoryType) ||
@@ -125,7 +125,7 @@ MmpScanMemoryDescriptors(VOID)
}
/* Store original free descriptor */
RtlCopyMemory(&MmOldFreeDescriptor, MmFreeDescriptor, sizeof(LOADER_MEMORY_MAPPING));
RtlCopyMemory(&MmOldFreeDescriptor, MmFreeDescriptor, sizeof(LOADER_MEMORY_DESCRIPTOR));
}
/** Checks whether the specified memory type should be considered as free.