Lines Matching refs:length
38 static void write_bytes(char *addr, size_t length)
42 for (i = 0; i < length; i++)
46 static void read_bytes(char *addr, size_t length)
51 for (i = 0; i < length; i++)
62 size_t length = LENGTH;
67 /* munmap with fail if the length is not page aligned */
68 if (hugepage_size > length)
69 length = hugepage_size;
75 length = atol(argv[1]) << 20;
86 ksft_print_msg("Mapping %lu Mbytes\n", (unsigned long)length >> 20);
88 addr = mmap(ADDR, length, PROTECTION, flags, -1, 0);
94 write_bytes(addr, length);
95 read_bytes(addr, length);
97 /* munmap() length of MAP_HUGETLB memory must be hugepage aligned */
98 if (munmap(addr, length))