mirror of
https://github.com/reactos/reactos.git
synced 2024-07-02 10:45:24 +00:00
[NTOS]: Define an array of MI_USAGE integers to track what a PFN is used for.
[NTOS]: Extend the MMPFN structure for ReactOS-specific PFN tracing mechanism. [NTOS]: Add macros to track page usage and process/extra-data (not yet used). svn path=/trunk/; revision=49443
This commit is contained in:
parent
3163a7e933
commit
5f9569d3c5
|
@ -295,6 +295,43 @@ typedef struct _MM_RMAP_ENTRY
|
|||
}
|
||||
MM_RMAP_ENTRY, *PMM_RMAP_ENTRY;
|
||||
|
||||
#if MI_TRACE_PFNS
|
||||
extern ULONG MI_PFN_CURRENT_USAGE;
|
||||
extern CHAR MI_PFN_CURRENT_PROCESS_NAME[16];
|
||||
#define MI_SET_USAGE(x) MI_PFN_CURRENT_USAGE = x
|
||||
#define MI_SET_PROCESS2(x) memcpy(MI_PFN_CURRENT_PROCESS_NAME, x, 16)
|
||||
#else
|
||||
#define MI_SET_USAGE(x)
|
||||
#define MI_SET_PROCESS2(x)
|
||||
#endif
|
||||
|
||||
typedef enum _MI_PFN_USAGES
|
||||
{
|
||||
MI_USAGE_NOT_SET = 0,
|
||||
MI_USAGE_PAGED_POOL,
|
||||
MI_USAGE_NONPAGED_POOL,
|
||||
MI_USAGE_NONPAGED_POOL_EXPANSION,
|
||||
MI_USAGE_KERNEL_STACK,
|
||||
MI_USAGE_KERNEL_STACK_EXPANSION,
|
||||
MI_USAGE_SYSTEM_PTE,
|
||||
MI_USAGE_VAD,
|
||||
MI_USAGE_PEB_TEB,
|
||||
MI_USAGE_SECTION,
|
||||
MI_USAGE_PAGE_TABLE,
|
||||
MI_USAGE_PAGE_DIRECTORY,
|
||||
MI_USAGE_LEGACY_PAGE_DIRECTORY,
|
||||
MI_USAGE_DRIVER_PAGE,
|
||||
MI_USAGE_CONTINOUS_ALLOCATION,
|
||||
MI_USAGE_MDL,
|
||||
MI_USAGE_DEMAND_ZERO,
|
||||
MI_USAGE_ZERO_LOOP,
|
||||
MI_USAGE_CACHE,
|
||||
MI_USAGE_PFN_DATABASE,
|
||||
MI_USAGE_BOOT_DRIVER,
|
||||
MI_USAGE_INIT_MEMORY,
|
||||
MI_USAGE_FREE_PAGE
|
||||
} MI_PFN_USAGES;
|
||||
|
||||
//
|
||||
// These two mappings are actually used by Windows itself, based on the ASSERTS
|
||||
//
|
||||
|
@ -362,6 +399,10 @@ typedef struct _MMPFN
|
|||
ULONG_PTR MustBeCached:1;
|
||||
};
|
||||
} u4;
|
||||
#if MI_TRACE_PFNS
|
||||
MI_PFN_USAGES PfnUsage;
|
||||
CHAR ProcessName[16];
|
||||
#endif
|
||||
} MMPFN, *PMMPFN;
|
||||
|
||||
extern PMMPFN MmPfnDatabase;
|
||||
|
|
Loading…
Reference in a new issue