Lines Matching full:pagesize
34 static size_t pagesize; variable
46 return __builtin_ctzll(size / pagesize); in sz2ord()
67 kb = (pagesize >> 10) << i; in detect_thp_sizes()
102 for (; size; addr += pagesize, size -= pagesize) in range_is_swapped()
746 mem = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, in do_run_with_base_page()
753 ret = madvise(mem, pagesize, MADV_NOHUGEPAGE); in do_run_with_base_page()
761 memset(mem, 1, pagesize); in do_run_with_base_page()
764 madvise(mem, pagesize, MADV_PAGEOUT); in do_run_with_base_page()
771 fn(mem, pagesize, false); in do_run_with_base_page()
773 munmap(mem, pagesize); in do_run_with_base_page()
828 if (!pagemap_is_populated(pagemap_fd, mem + thpsize - pagesize)) { in do_run_with_thp()
847 ret = mprotect(mem + pagesize, pagesize, PROT_READ); in do_run_with_thp()
852 ret = mprotect(mem + pagesize, pagesize, PROT_READ | PROT_WRITE); in do_run_with_thp()
864 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DONTNEED); in do_run_with_thp()
869 size = pagesize; in do_run_with_thp()
897 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DONTFORK); in do_run_with_thp()
911 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DOFORK); in do_run_with_thp()
1237 ret = mprotect(mem + pagesize, pagesize, PROT_READ); in do_test_anon_thp_collapse()
1242 ret = mprotect(mem + pagesize, pagesize, PROT_READ | PROT_WRITE); in do_test_anon_thp_collapse()
1477 mem = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, in run_with_zeropage()
1484 smem = mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0); in run_with_zeropage()
1494 fn(mem, smem, pagesize); in run_with_zeropage()
1496 munmap(mem, pagesize); in run_with_zeropage()
1498 munmap(smem, pagesize); in run_with_zeropage()
1547 if (!pagemap_is_populated(pagemap_fd, mem + pagesize) || in run_with_huge_zeropage()
1548 !pagemap_is_populated(pagemap_fd, smem + pagesize)) { in run_with_huge_zeropage()
1574 if (fallocate(fd, 0, 0, pagesize)) { in run_with_memfd()
1580 mem = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in run_with_memfd()
1585 smem = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, fd, 0); in run_with_memfd()
1595 fn(mem, smem, pagesize); in run_with_memfd()
1597 munmap(mem, pagesize); in run_with_memfd()
1599 munmap(smem, pagesize); in run_with_memfd()
1625 if (fallocate(fd, 0, 0, pagesize)) { in run_with_tmpfile()
1631 mem = mmap(NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in run_with_tmpfile()
1636 smem = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, fd, 0); in run_with_tmpfile()
1646 fn(mem, smem, pagesize); in run_with_tmpfile()
1648 munmap(mem, pagesize); in run_with_tmpfile()
1650 munmap(smem, pagesize); in run_with_tmpfile()
1779 pagesize = getpagesize(); in main()