Lines Matching full:pagesize

15 static void test_simple(int pagemap_fd, int pagesize)  in test_simple()  argument
20 map = aligned_alloc(pagesize, pagesize); in test_simple()
48 static void test_vma_reuse(int pagemap_fd, int pagesize) in test_vma_reuse() argument
52 map = mmap(NULL, pagesize, (PROT_READ | PROT_WRITE), (MAP_PRIVATE | MAP_ANON), -1, 0); in test_vma_reuse()
61 munmap(map, pagesize); in test_vma_reuse()
63 map2 = mmap(NULL, pagesize, (PROT_READ | PROT_WRITE), (MAP_PRIVATE | MAP_ANON), -1, 0); in test_vma_reuse()
74 munmap(map2, pagesize); in test_vma_reuse()
77 static void test_hugepage(int pagemap_fd, int pagesize) in test_hugepage() argument
124 static void test_mprotect(int pagemap_fd, int pagesize, bool anon) in test_mprotect() argument
132 map = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, in test_mprotect()
143 ftruncate(test_fd, pagesize); in test_mprotect()
144 map = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, in test_mprotect()
158 mprotect(map, pagesize, PROT_READ); in test_mprotect()
162 mprotect(map, pagesize, PROT_READ|PROT_WRITE); in test_mprotect()
171 munmap(map, pagesize); in test_mprotect()
177 static void test_mprotect_anon(int pagemap_fd, int pagesize) in test_mprotect_anon() argument
179 test_mprotect(pagemap_fd, pagesize, true); in test_mprotect_anon()
182 static void test_mprotect_file(int pagemap_fd, int pagesize) in test_mprotect_file() argument
184 test_mprotect(pagemap_fd, pagesize, false); in test_mprotect_file()
190 int pagesize; in main() local
199 pagesize = getpagesize(); in main()
201 test_simple(pagemap_fd, pagesize); in main()
202 test_vma_reuse(pagemap_fd, pagesize); in main()
203 test_hugepage(pagemap_fd, pagesize); in main()
204 test_mprotect_anon(pagemap_fd, pagesize); in main()
205 test_mprotect_file(pagemap_fd, pagesize); in main()