Lines Matching defs:prot

146 	int prot = 0;
149 prot |= PROT_READ;
151 prot |= PROT_WRITE;
153 prot |= PROT_EXEC;
155 return prot;
160 printf("usage: ksm_tests [-h] <test type> [-a prot] [-p page_count] [-l timeout]\n"
180 " <prot> must be of the form [rwx].\n"
200 static void *allocate_memory(void *ptr, int prot, int mapping, char data, size_t map_size)
209 if (mprotect(map_ptr, map_size, prot)) {
347 static int check_ksm_merge(int merge_type, int mapping, int prot,
359 map_ptr = allocate_memory(NULL, prot, mapping, '*', page_size * page_count);
381 static int check_ksm_unmerge(int merge_type, int mapping, int prot, int timeout, size_t page_size)
393 map_ptr = allocate_memory(NULL, prot, mapping, '*', page_size * page_count);
421 static int check_ksm_zero_page_merge(int merge_type, int mapping, int prot, long page_count,
436 map_ptr = allocate_memory(NULL, prot, mapping, 0, page_size * page_count);
486 static int check_ksm_numa_merge(int merge_type, int mapping, int prot, int timeout,
550 static int ksm_merge_hugepages_time(int merge_type, int mapping, int prot,
618 static int ksm_merge_time(int merge_type, int mapping, int prot, int timeout, size_t map_size)
626 map_ptr = allocate_memory(NULL, prot, mapping, '*', map_size);
659 static int ksm_unmerge_time(int merge_type, int mapping, int prot, int timeout, size_t map_size)
667 map_ptr = allocate_memory(NULL, prot, mapping, '*', map_size);
706 static int ksm_cow_time(int merge_type, int mapping, int prot, int timeout, size_t page_size)
715 map_ptr = allocate_memory(NULL, prot, mapping, '*', page_size * page_count);
780 int prot = 0;
794 prot = str_to_prot(optarg);
874 if (prot == 0)
875 prot = str_to_prot(KSM_PROT_STR_DEFAULT);
896 ret = check_ksm_merge(merge_type, MAP_PRIVATE | MAP_ANONYMOUS, prot, page_count,
900 ret = check_ksm_unmerge(merge_type, MAP_PRIVATE | MAP_ANONYMOUS, prot,
904 ret = check_ksm_zero_page_merge(merge_type, MAP_PRIVATE | MAP_ANONYMOUS, prot,
909 ret = check_ksm_numa_merge(merge_type, MAP_PRIVATE | MAP_ANONYMOUS, prot,
917 ret = ksm_merge_time(merge_type, MAP_PRIVATE | MAP_ANONYMOUS, prot,
925 ret = ksm_merge_hugepages_time(merge_type, MAP_PRIVATE | MAP_ANONYMOUS, prot,
933 ret = ksm_unmerge_time(merge_type, MAP_PRIVATE | MAP_ANONYMOUS, prot,
937 ret = ksm_cow_time(merge_type, MAP_PRIVATE | MAP_ANONYMOUS, prot,