00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __loaded__pagemap_h__
00021 #define __loaded__pagemap_h__
00022 using namespace std;
00023 #line 1 "pagemap.h++"
00024 #include <stdint.h>
00025
00026
00027
00028
00029 #define PM_ENTRY_BYTES sizeof(uint64_t)
00030 #define PM_STATUS_BITS 3
00031 #define PM_STATUS_OFFSET (64 - PM_STATUS_BITS)
00032 #define PM_STATUS_MASK (((1LL << PM_STATUS_BITS) - 1) << PM_STATUS_OFFSET)
00033 #define PM_STATUS(nr) (((nr) << PM_STATUS_OFFSET) & PM_STATUS_MASK)
00034 #define PM_PSHIFT_BITS 6
00035 #define PM_PSHIFT_OFFSET (PM_STATUS_OFFSET - PM_PSHIFT_BITS)
00036 #define PM_PSHIFT_MASK (((1LL << PM_PSHIFT_BITS) - 1) << PM_PSHIFT_OFFSET)
00037 #define PM_PSHIFT(x) (((uint64_t) (x) << PM_PSHIFT_OFFSET) & PM_PSHIFT_MASK)
00038 #define PM_PFRAME_MASK ((1LL << PM_PSHIFT_OFFSET) - 1)
00039 #define PM_PFRAME(x) ((x) & PM_PFRAME_MASK)
00040
00041 #define PM_PRESENT PM_STATUS(4LL)
00042 #define PM_SWAP PM_STATUS(2LL)
00043
00044
00045 #define KPF_LOCKED 0
00046 #define KPF_ERROR 1
00047 #define KPF_REFERENCED 2
00048 #define KPF_UPTODATE 3
00049 #define KPF_DIRTY 4
00050 #define KPF_LRU 5
00051 #define KPF_ACTIVE 6
00052 #define KPF_SLAB 7
00053 #define KPF_WRITEBACK 8
00054 #define KPF_RECLAIM 9
00055 #define KPF_BUDDY 10
00056
00057
00058 #define KPF_MMAP 11
00059 #define KPF_ANON 12
00060 #define KPF_SWAPCACHE 13
00061 #define KPF_SWAPBACKED 14
00062 #define KPF_COMPOUND_HEAD 15
00063 #define KPF_COMPOUND_TAIL 16
00064 #define KPF_HUGE 17
00065 #define KPF_UNEVICTABLE 18
00066 #define KPF_HWPOISON 19
00067 #define KPF_NOPAGE 20
00068 #define KPF_KSM 21
00069
00070
00071 #define KPF_RESERVED 32
00072 #define KPF_MLOCKED 33
00073 #define KPF_MAPPEDTODISK 34
00074 #define KPF_PRIVATE 35
00075 #define KPF_PRIVATE_2 36
00076 #define KPF_OWNER_PRIVATE 37
00077 #define KPF_ARCH 38
00078 #define KPF_UNCACHED 39
00079
00080
00081
00082
00083 #define KPF_READAHEAD 48
00084 #define KPF_SLOB_FREE 49
00085 #define KPF_SLUB_FROZEN 50
00086 #define KPF_SLUB_DEBUG 51
00087 #endif // __loaded__pagemap_h__