1 2 3 4 5 6 7 8 9 10 11 12 | 在 include/linux/page.h 中: struct page { ... #ifdef CONFIG_KMEMCHECK ( 宏定义在下文会介绍) /* * kmemcheck wants to track the status of each byte in a page; this * is a pointer to such a status block. NULL if not tracked. */ void *shadow; #endif ... } |
1 2 3 4 5 6 7 8 | 在 arch/x86/include/asm/pgtable_types.h 中: #define _PAGE_BIT_HIDDEN 11 /* hidden by kmemcheck */ … #ifdef CONFIG_KMEMCHECK #define _PAGE_HIDDEN (_AT(pteval_t, 1) << _PAGE_BIT_HIDDEN) #else #define _PAGE_HIDDEN (_AT(pteval_t, 0)) #endif |
1 2 3 4 5 6 | 在 arch/x86/include/asm/slab.h 中: #ifdef CONFIG_KMEMCHECK # define SLAB_NOTRACK 0x01000000UL #else # define SLAB_NOTRACK 0x00000000UL #endif |
1 2 3 4 5 6 | 在 include/linux/gfp.h 中: #ifdef CONFIG_KMEMCHECK #define __GFP_NOTRACK ((__force gfp_t)0x200000u) /* Don't track with kmemcheck */ #else #define __GFP_NOTRACK ((__force gfp_t)0) #endif |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |