Lines Matching refs:pagesize
45 static unsigned int pagesize; variable
62 len = pagesize + (pagesize * i); in check_aligned_anonymous_unfixed_mmaps()
96 memcpy(dummybuf, p1, pagesize); in check_aligned_anonymous_unfixed_mmaps()
97 memcpy(dummybuf, p2, pagesize); in check_aligned_anonymous_unfixed_mmaps()
98 memcpy(dummybuf, p3, pagesize); in check_aligned_anonymous_unfixed_mmaps()
99 memcpy(dummybuf, p4, pagesize); in check_aligned_anonymous_unfixed_mmaps()
100 memcpy(dummybuf, p5, pagesize); in check_aligned_anonymous_unfixed_mmaps()
129 memcpy (dummybuf, p1, pagesize); in check_large_anonymous_unfixed_mmap()
145 p1 = mmap(NULL, pagesize, PROT_READ, in check_aligned_anonymous_unfixed_colliding_mmaps()
150 memcpy(dummybuf, p1, pagesize); in check_aligned_anonymous_unfixed_colliding_mmaps()
152 p2 = mmap(NULL, pagesize, PROT_READ, in check_aligned_anonymous_unfixed_colliding_mmaps()
157 memcpy(dummybuf, p2, pagesize); in check_aligned_anonymous_unfixed_colliding_mmaps()
160 munmap(p1, pagesize); in check_aligned_anonymous_unfixed_colliding_mmaps()
161 nlen = pagesize * 8; in check_aligned_anonymous_unfixed_colliding_mmaps()
172 memcpy(dummybuf, p3, pagesize); in check_aligned_anonymous_unfixed_colliding_mmaps()
180 munmap(p2, pagesize); in check_aligned_anonymous_unfixed_colliding_mmaps()
194 addr = mmap(NULL, pagesize * 40, PROT_READ | PROT_WRITE, in check_aligned_anonymous_fixed_mmaps()
203 p1 = mmap(addr, pagesize, PROT_READ, in check_aligned_anonymous_fixed_mmaps()
211 memcpy (dummybuf, p1, pagesize); in check_aligned_anonymous_fixed_mmaps()
212 munmap (p1, pagesize); in check_aligned_anonymous_fixed_mmaps()
213 addr += pagesize; in check_aligned_anonymous_fixed_mmaps()
234 p1 = mmap(addr, pagesize, PROT_READ | PROT_WRITE, in check_aligned_anonymous_fixed_mmaps_collide_with_host()
242 memcpy (p1, dummybuf, pagesize); in check_aligned_anonymous_fixed_mmaps_collide_with_host()
243 munmap (p1, pagesize); in check_aligned_anonymous_fixed_mmaps_collide_with_host()
244 addr += pagesize; in check_aligned_anonymous_fixed_mmaps_collide_with_host()
260 len = pagesize; in check_file_unfixed_mmaps()
266 test_fd, pagesize); in check_file_unfixed_mmaps()
269 test_fd, pagesize * 2); in check_file_unfixed_mmaps()
287 fail_unless (*p2 == (pagesize / sizeof *p2)); in check_file_unfixed_mmaps()
288 fail_unless (*p3 == ((pagesize * 2) / sizeof *p3)); in check_file_unfixed_mmaps()
290 memcpy (dummybuf, p1, pagesize); in check_file_unfixed_mmaps()
291 memcpy (dummybuf, p2, pagesize); in check_file_unfixed_mmaps()
292 memcpy (dummybuf, p3, pagesize); in check_file_unfixed_mmaps()
310 p1 = mmap(NULL, pagesize, PROT_READ, in check_file_unfixed_eof_mmaps()
327 fail_unless (cp[pagesize - 4] == 0); in check_file_unfixed_eof_mmaps()
328 munmap (p1, pagesize); in check_file_unfixed_eof_mmaps()
342 addr = mmap(NULL, pagesize * 44, PROT_READ, in check_file_fixed_eof_mmaps()
352 p1 = mmap(addr, pagesize, PROT_READ, in check_file_fixed_eof_mmaps()
370 fail_unless (cp[pagesize - 4] == 0); in check_file_fixed_eof_mmaps()
371 munmap (p1, pagesize); in check_file_fixed_eof_mmaps()
372 addr += pagesize; in check_file_fixed_eof_mmaps()
384 addr = mmap(NULL, pagesize * 40 * 4, PROT_READ, in check_file_fixed_mmaps()
392 p1 = mmap(addr, pagesize, PROT_READ, in check_file_fixed_mmaps()
395 p2 = mmap(addr + pagesize, pagesize, PROT_READ, in check_file_fixed_mmaps()
397 test_fd, pagesize); in check_file_fixed_mmaps()
398 p3 = mmap(addr + pagesize * 2, pagesize, PROT_READ, in check_file_fixed_mmaps()
400 test_fd, pagesize * 2); in check_file_fixed_mmaps()
401 p4 = mmap(addr + pagesize * 3, pagesize, PROT_READ, in check_file_fixed_mmaps()
403 test_fd, pagesize * 3); in check_file_fixed_mmaps()
408 fail_unless (p2 == (void *)addr + pagesize); in check_file_fixed_mmaps()
409 fail_unless (p3 == (void *)addr + pagesize * 2); in check_file_fixed_mmaps()
410 fail_unless (p4 == (void *)addr + pagesize * 3); in check_file_fixed_mmaps()
414 fail_unless (*p2 == (pagesize / sizeof *p2)); in check_file_fixed_mmaps()
415 fail_unless (*p3 == ((pagesize * 2) / sizeof *p3)); in check_file_fixed_mmaps()
416 fail_unless (*p4 == ((pagesize * 3) / sizeof *p4)); in check_file_fixed_mmaps()
418 memcpy (dummybuf, p1, pagesize); in check_file_fixed_mmaps()
419 memcpy (dummybuf, p2, pagesize); in check_file_fixed_mmaps()
420 memcpy (dummybuf, p3, pagesize); in check_file_fixed_mmaps()
421 memcpy (dummybuf, p4, pagesize); in check_file_fixed_mmaps()
423 munmap (p1, pagesize); in check_file_fixed_mmaps()
424 munmap (p2, pagesize); in check_file_fixed_mmaps()
425 munmap (p3, pagesize); in check_file_fixed_mmaps()
426 munmap (p4, pagesize); in check_file_fixed_mmaps()
427 addr += pagesize * 4; in check_file_fixed_mmaps()
465 pagesize = strtoul(argv[1], NULL, 0); in main()
467 pagesize = sysconf(_SC_PAGESIZE); in main()
470 pagemask = pagesize - 1; in main()
471 dummybuf = malloc (pagesize); in main()
472 printf ("pagesize=%u pagemask=%x\n", pagesize, pagemask); in main()
478 for (i = 0; i < (pagesize * 4) / sizeof i; i++) { in main()