mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 17:10:22 +00: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:
parent
42c7e4f66a
commit
d0a7e496aa
4 changed files with 12 additions and 0 deletions
|
@ -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_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_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
|
typedef struct _MM_RMAP_ENTRY
|
||||||
{
|
{
|
||||||
|
|
|
@ -1295,6 +1295,9 @@ MmCleanProcessAddressSpace(IN PEPROCESS Process)
|
||||||
/* Check for old-style memory areas */
|
/* Check for old-style memory areas */
|
||||||
if (MI_IS_MEMORY_AREA_VAD(Vad))
|
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 */
|
/* Let RosMm handle this */
|
||||||
MiRosCleanupMemoryArea(Process, Vad);
|
MiRosCleanupMemoryArea(Process, Vad);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -1569,6 +1569,9 @@ MiGetFileObjectForVad(
|
||||||
{
|
{
|
||||||
PMEMORY_AREA MemoryArea = (PMEMORY_AREA)Vad;
|
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) */
|
/* Check if it's a section view (RosMm section) */
|
||||||
if (MemoryArea->Type == MEMORY_AREA_SECTION_VIEW)
|
if (MemoryArea->Type == MEMORY_AREA_SECTION_VIEW)
|
||||||
{
|
{
|
||||||
|
|
|
@ -440,6 +440,10 @@ MmCreateMemoryArea(PMMSUPPORT AddressSpace,
|
||||||
MemoryArea->Magic = 'erAM';
|
MemoryArea->Magic = 'erAM';
|
||||||
MemoryArea->DeleteInProgress = FALSE;
|
MemoryArea->DeleteInProgress = FALSE;
|
||||||
MI_SET_MEMORY_AREA_VAD(&MemoryArea->VadNode);
|
MI_SET_MEMORY_AREA_VAD(&MemoryArea->VadNode);
|
||||||
|
if (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3)
|
||||||
|
{
|
||||||
|
MI_SET_ROSMM_VAD(&MemoryArea->VadNode);
|
||||||
|
}
|
||||||
|
|
||||||
if (*BaseAddress == 0)
|
if (*BaseAddress == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue