Lines Matching refs:pagesize

17 static void test_simple(int pagemap_fd, int pagesize)  in test_simple()  argument
22 map = aligned_alloc(pagesize, pagesize); in test_simple()
50 static void test_vma_reuse(int pagemap_fd, int pagesize) in test_vma_reuse() argument
54 map = mmap(NULL, pagesize, (PROT_READ | PROT_WRITE), (MAP_PRIVATE | MAP_ANON), -1, 0); in test_vma_reuse()
63 munmap(map, pagesize); in test_vma_reuse()
65 map2 = mmap(NULL, pagesize, (PROT_READ | PROT_WRITE), (MAP_PRIVATE | MAP_ANON), -1, 0); in test_vma_reuse()
76 munmap(map2, pagesize); in test_vma_reuse()
79 static void test_hugepage(int pagemap_fd, int pagesize) in test_hugepage() argument
134 static void test_mprotect(int pagemap_fd, int pagesize, bool anon) in test_mprotect() argument
142 map = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, in test_mprotect()
153 ftruncate(test_fd, pagesize); in test_mprotect()
154 map = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, in test_mprotect()
168 mprotect(map, pagesize, PROT_READ); in test_mprotect()
172 mprotect(map, pagesize, PROT_READ|PROT_WRITE); in test_mprotect()
181 munmap(map, pagesize); in test_mprotect()
187 static void test_mprotect_anon(int pagemap_fd, int pagesize) in test_mprotect_anon() argument
189 test_mprotect(pagemap_fd, pagesize, true); in test_mprotect_anon()
192 static void test_mprotect_file(int pagemap_fd, int pagesize) in test_mprotect_file() argument
194 test_mprotect(pagemap_fd, pagesize, false); in test_mprotect_file()
200 int pagesize; in main() local
209 pagesize = getpagesize(); in main()
211 test_simple(pagemap_fd, pagesize); in main()
212 test_vma_reuse(pagemap_fd, pagesize); in main()
213 test_hugepage(pagemap_fd, pagesize); in main()
214 test_mprotect_anon(pagemap_fd, pagesize); in main()
215 test_mprotect_file(pagemap_fd, pagesize); in main()