Lines Matching refs:hugetlbsize
926 static void run_with_hugetlb(test_fn fn, const char *desc, size_t hugetlbsize) in run_with_hugetlb() argument
932 hugetlbsize / 1024); in run_with_hugetlb()
934 flags |= __builtin_ctzll(hugetlbsize) << MAP_HUGE_SHIFT; in run_with_hugetlb()
936 mem = mmap(NULL, hugetlbsize, PROT_READ | PROT_WRITE, flags, -1, 0); in run_with_hugetlb()
943 memset(mem, 0, hugetlbsize); in run_with_hugetlb()
949 dummy = mmap(NULL, hugetlbsize, PROT_READ | PROT_WRITE, flags, -1, 0); in run_with_hugetlb()
954 munmap(dummy, hugetlbsize); in run_with_hugetlb()
956 fn(mem, hugetlbsize); in run_with_hugetlb()
958 munmap(mem, hugetlbsize); in run_with_hugetlb()
1563 size_t hugetlbsize) in run_with_memfd_hugetlb() argument
1570 hugetlbsize / 1024); in run_with_memfd_hugetlb()
1572 flags |= __builtin_ctzll(hugetlbsize) << MFD_HUGE_SHIFT; in run_with_memfd_hugetlb()
1581 if (fallocate(fd, 0, 0, hugetlbsize)) { in run_with_memfd_hugetlb()
1587 mem = mmap(NULL, hugetlbsize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, in run_with_memfd_hugetlb()
1593 smem = mmap(NULL, hugetlbsize, PROT_READ, MAP_SHARED, fd, 0); in run_with_memfd_hugetlb()
1603 fn(mem, smem, hugetlbsize); in run_with_memfd_hugetlb()
1605 munmap(mem, hugetlbsize); in run_with_memfd_hugetlb()
1607 munmap(smem, hugetlbsize); in run_with_memfd_hugetlb()