Lines Matching refs:prot

92 	int prot = 0;  in str_to_prot()  local
95 prot |= PROT_READ; in str_to_prot()
97 prot |= PROT_WRITE; in str_to_prot()
99 prot |= PROT_EXEC; in str_to_prot()
101 return prot; in str_to_prot()
138 static void *allocate_memory(void *ptr, int prot, int mapping, char data, size_t map_size) in allocate_memory() argument
147 if (mprotect(map_ptr, map_size, prot)) { in allocate_memory()
259 static int check_ksm_merge(int mapping, int prot, long page_count, int timeout, size_t page_size) in check_ksm_merge() argument
270 map_ptr = allocate_memory(NULL, prot, mapping, '*', page_size * page_count); in check_ksm_merge()
290 static int check_ksm_unmerge(int mapping, int prot, int timeout, size_t page_size) in check_ksm_unmerge() argument
302 map_ptr = allocate_memory(NULL, prot, mapping, '*', page_size * page_count); in check_ksm_unmerge()
330 static int check_ksm_zero_page_merge(int mapping, int prot, long page_count, int timeout, in check_ksm_zero_page_merge() argument
345 map_ptr = allocate_memory(NULL, prot, mapping, 0, page_size * page_count); in check_ksm_zero_page_merge()
395 static int check_ksm_numa_merge(int mapping, int prot, int timeout, bool merge_across_nodes, in check_ksm_numa_merge() argument
487 static int ksm_merge_hugepages_time(int mapping, int prot, int timeout, size_t map_size) in ksm_merge_hugepages_time() argument
554 static int ksm_merge_time(int mapping, int prot, int timeout, size_t map_size) in ksm_merge_time() argument
562 map_ptr = allocate_memory(NULL, prot, mapping, '*', map_size); in ksm_merge_time()
595 static int ksm_cow_time(int mapping, int prot, int timeout, size_t page_size) in ksm_cow_time() argument
604 map_ptr = allocate_memory(NULL, prot, mapping, '*', page_size * page_count); in ksm_cow_time()
669 int prot = 0; in main() local
682 prot = str_to_prot(optarg); in main()
744 if (prot == 0) in main()
745 prot = str_to_prot(KSM_PROT_STR_DEFAULT); in main()
765 ret = check_ksm_merge(MAP_PRIVATE | MAP_ANONYMOUS, prot, page_count, in main()
769 ret = check_ksm_unmerge(MAP_PRIVATE | MAP_ANONYMOUS, prot, ksm_scan_limit_sec, in main()
773 ret = check_ksm_zero_page_merge(MAP_PRIVATE | MAP_ANONYMOUS, prot, page_count, in main()
777 ret = check_ksm_numa_merge(MAP_PRIVATE | MAP_ANONYMOUS, prot, ksm_scan_limit_sec, in main()
785 ret = ksm_merge_time(MAP_PRIVATE | MAP_ANONYMOUS, prot, ksm_scan_limit_sec, in main()
793 ret = ksm_merge_hugepages_time(MAP_PRIVATE | MAP_ANONYMOUS, prot, in main()
797 ret = ksm_cow_time(MAP_PRIVATE | MAP_ANONYMOUS, prot, ksm_scan_limit_sec, in main()