mirror of
https://github.com/reactos/reactos
synced 2025-10-06 00:12:51 +02:00
[NTOS:MM] Mark RosMm memory areas
This is to distinguish them from ARM³ memory areas, which we use for some kernel regions, like paged pool.
This commit is contained in:
@@ -271,6 +271,8 @@ typedef struct _MEMORY_AREA
|
||||
|
||||
#define MI_SET_MEMORY_AREA_VAD(Vad) do { (Vad)->u.VadFlags.Spare |= 1; } while (0)
|
||||
#define MI_IS_MEMORY_AREA_VAD(Vad) (((Vad)->u.VadFlags.Spare & 1) != 0)
|
||||
#define MI_SET_ROSMM_VAD(Vad) do { (Vad)->u.VadFlags.Spare |= 2; } while (0)
|
||||
#define MI_IS_ROSMM_VAD(Vad) (((Vad)->u.VadFlags.Spare & 2) != 0)
|
||||
|
||||
typedef struct _MM_RMAP_ENTRY
|
||||
{
|
||||
|
@@ -1295,6 +1295,9 @@ MmCleanProcessAddressSpace(IN PEPROCESS Process)
|
||||
/* Check for old-style memory areas */
|
||||
if (MI_IS_MEMORY_AREA_VAD(Vad))
|
||||
{
|
||||
/* We do not expect ARM3 memory areas here, those are kernel only */
|
||||
ASSERT(MI_IS_ROSMM_VAD(Vad));
|
||||
|
||||
/* Let RosMm handle this */
|
||||
MiRosCleanupMemoryArea(Process, Vad);
|
||||
continue;
|
||||
|
@@ -1569,6 +1569,9 @@ MiGetFileObjectForVad(
|
||||
{
|
||||
PMEMORY_AREA MemoryArea = (PMEMORY_AREA)Vad;
|
||||
|
||||
/* We do not expect ARM3 memory areas here, those are kernel only */
|
||||
ASSERT(MI_IS_ROSMM_VAD(Vad));
|
||||
|
||||
/* Check if it's a section view (RosMm section) */
|
||||
if (MemoryArea->Type == MEMORY_AREA_SECTION_VIEW)
|
||||
{
|
||||
|
@@ -440,6 +440,10 @@ MmCreateMemoryArea(PMMSUPPORT AddressSpace,
|
||||
MemoryArea->Magic = 'erAM';
|
||||
MemoryArea->DeleteInProgress = FALSE;
|
||||
MI_SET_MEMORY_AREA_VAD(&MemoryArea->VadNode);
|
||||
if (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3)
|
||||
{
|
||||
MI_SET_ROSMM_VAD(&MemoryArea->VadNode);
|
||||
}
|
||||
|
||||
if (*BaseAddress == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user