Searched refs:page_size (Results 1 - 25 of 146) sorted by relevance

123456

/external/strace/tests/
H A Dget_page_size.c7 static size_t page_size; local
9 if (!page_size)
10 page_size = sysconf(_SC_PAGESIZE);
12 return page_size;
H A Dtail_alloc.c35 const size_t page_size = get_page_size(); local
36 const size_t len = (size + page_size - 1) & -page_size;
37 const size_t alloc_size = len + 6 * page_size;
44 void *start_work = p + 3 * page_size;
47 if (munmap(p, page_size) ||
48 munmap(p + 2 * page_size, page_size) ||
49 munmap(tail_guard, page_size) ||
50 munmap(tail_guard + 2 * page_size, page_siz
[all...]
H A Dsendfile64.c54 const unsigned int page_size = get_page_size(); local
55 assert(syscall(__NR_sendfile64, 0, 1, NULL, page_size) == -1);
58 printf("sendfile64(0, 1, NULL, %u) = -1 EBADF (%m)\n", page_size);
68 if (file_size / 16 > page_size)
69 file_size = page_size * 16;
86 assert(syscall(__NR_sendfile64, 0, 1, p, page_size) == -1);
87 printf("sendfile64(0, 1, %p, %u) = -1 EFAULT (%m)\n", p, page_size);
/external/strace/tests-m32/
H A Dget_page_size.c7 static size_t page_size; local
9 if (!page_size)
10 page_size = sysconf(_SC_PAGESIZE);
12 return page_size;
H A Dtail_alloc.c35 const size_t page_size = get_page_size(); local
36 const size_t len = (size + page_size - 1) & -page_size;
37 const size_t alloc_size = len + 6 * page_size;
44 void *start_work = p + 3 * page_size;
47 if (munmap(p, page_size) ||
48 munmap(p + 2 * page_size, page_size) ||
49 munmap(tail_guard, page_size) ||
50 munmap(tail_guard + 2 * page_size, page_siz
[all...]
H A Dsendfile64.c54 const unsigned int page_size = get_page_size(); local
55 assert(syscall(__NR_sendfile64, 0, 1, NULL, page_size) == -1);
58 printf("sendfile64(0, 1, NULL, %u) = -1 EBADF (%m)\n", page_size);
68 if (file_size / 16 > page_size)
69 file_size = page_size * 16;
86 assert(syscall(__NR_sendfile64, 0, 1, p, page_size) == -1);
87 printf("sendfile64(0, 1, %p, %u) = -1 EFAULT (%m)\n", p, page_size);
/external/strace/tests-mx32/
H A Dget_page_size.c7 static size_t page_size; local
9 if (!page_size)
10 page_size = sysconf(_SC_PAGESIZE);
12 return page_size;
H A Dtail_alloc.c35 const size_t page_size = get_page_size(); local
36 const size_t len = (size + page_size - 1) & -page_size;
37 const size_t alloc_size = len + 6 * page_size;
44 void *start_work = p + 3 * page_size;
47 if (munmap(p, page_size) ||
48 munmap(p + 2 * page_size, page_size) ||
49 munmap(tail_guard, page_size) ||
50 munmap(tail_guard + 2 * page_size, page_siz
[all...]
H A Dsendfile64.c54 const unsigned int page_size = get_page_size(); local
55 assert(syscall(__NR_sendfile64, 0, 1, NULL, page_size) == -1);
58 printf("sendfile64(0, 1, NULL, %u) = -1 EBADF (%m)\n", page_size);
68 if (file_size / 16 > page_size)
69 file_size = page_size * 16;
86 assert(syscall(__NR_sendfile64, 0, 1, p, page_size) == -1);
87 printf("sendfile64(0, 1, %p, %u) = -1 EFAULT (%m)\n", p, page_size);
/external/compiler-rt/lib/sanitizer_common/tests/
H A Dsanitizer_posix_test.cc63 const int page_size = GetPageSize(); local
64 uptr mem = (uptr)mmap(0, 3 * page_size, PROT_READ | PROT_WRITE,
67 mprotect((void *)(mem + page_size), page_size, PROT_NONE);
68 EXPECT_TRUE(IsAccessibleMemoryRange(mem, page_size - 1));
69 EXPECT_TRUE(IsAccessibleMemoryRange(mem, page_size));
70 EXPECT_FALSE(IsAccessibleMemoryRange(mem, page_size + 1));
71 EXPECT_TRUE(IsAccessibleMemoryRange(mem + page_size - 1, 1));
72 EXPECT_FALSE(IsAccessibleMemoryRange(mem + page_size - 1, 2));
73 EXPECT_FALSE(IsAccessibleMemoryRange(mem + 2 * page_size
[all...]
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/munlock/
H A D11-1.c25 long page_size; local
28 page_size = sysconf(_SC_PAGESIZE);
34 ptr = malloc(page_size);
40 notpage_ptr = ((long)ptr % page_size) ? ptr : ptr + 1;
42 result = munlock(notpage_ptr, page_size - 1);
H A D10-1.c29 long page_size; local
32 page_size = sysconf(_SC_PAGESIZE);
38 page_ptr = (void *)(LONG_MAX - (LONG_MAX % page_size));
/external/ltp/testcases/kernel/mem/mmapstress/
H A Dmmapstress04.c32 static int page_size; variable
37 page_size = getpagesize();
43 mmap_area = SAFE_MMAP(NULL, page_size * NUM_PAGES, PROT_NONE,
64 if (tst_fill_file(TEST_FILE, 'b', page_size, 1))
86 mapoff = page_size * (off_t)(6 * i + j);
87 SAFE_MMAP(mmap_area + page_size * mapped_pages++,
88 page_size, PROT_READ,
97 buf = SAFE_MALLOC(page_size);
98 memset(buf, 'a', page_size);
100 write_fully(rwfd, buf, page_size);
[all...]
/external/valgrind/none/tests/linux/
H A Dclonev.c19 long page_size = sysconf(_SC_PAGE_SIZE); local
20 assert(page_size != -1);
23 long stack_size = sysconf(_SC_THREAD_STACK_MIN) + page_size;
26 size_t stack_and_guard_size = page_size + stack_size + page_size;
36 if (-1 == mprotect((char *)child_stack, page_size, PROT_NONE)) {
41 if (-1 == mprotect((char *)child_stack + page_size + stack_size,
42 page_size, PROT_NONE)) {
47 void *stack_start = (char *)child_stack + page_size + stack_size;
49 printf("stack_start %p page_size
[all...]
/external/compiler-rt/test/sanitizer_common/TestCases/Linux/
H A Dsignal_segv_handler.cc23 unsigned long page_size; variable
27 mprotect(guard, page_size, PROT_READ | PROT_WRITE);
31 page_size = sysconf(_SC_PAGESIZE);
38 guard = mmap(0, 3 * page_size, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
39 guard = (char*)guard + page_size; // work around a kernel bug
41 mprotect(guard, page_size, PROT_NONE);
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlock/
H A D8-1.c29 long page_size; local
32 page_size = sysconf(_SC_PAGESIZE);
38 page_ptr = (void *)(LONG_MAX - (LONG_MAX % page_size));
H A D10-1.c25 long page_size; local
28 page_size = sysconf(_SC_PAGESIZE);
34 ptr = malloc(page_size);
40 notpage_ptr = ((long)ptr % page_size) ? ptr : ptr + 1;
42 result = mlock(notpage_ptr, page_size - 1);
/external/toolchain-utils/
H A Dperf-to-inst-page.sh16 # page_size : the size to be displayed, usually 4096(byte).
25 page_size=$4
35 if ! [[ $page_size =~ $re ]] ; then
36 echo "error: page_size is not a number" >&2; exit 1
55 if (addr < $binary_maximum) print \$7,count,int(addr/$page_size)*$page_size}" > out.txt
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/
H A D3-7.c26 size_t page_size; local
31 page_size = sysconf(_SC_PAGESIZE);
44 foo = mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, 0);
60 page_ptr = (void *)((long)foo - ((long)foo % page_size));
62 result = msync(page_ptr, page_size, MS_SYNC | MS_INVALIDATE);
/external/ltp/testcases/kernel/syscalls/mincore/
H A Dmincore02.c45 static int page_size; variable
52 munlock(addr, page_size * num_pages);
53 munmap(addr, page_size * num_pages);
65 page_size = getpagesize();
66 if (page_size == -1)
69 size = page_size * num_pages;
73 vec = malloc((size + page_size - 1) / page_size);
113 if (mincore(addr, num_pages * page_size, vec) == -1) {
/external/linux-kselftest/tools/testing/selftests/vm/
H A Dmlock2-tests.c225 unsigned long page_size = getpagesize(); local
229 page2_flags = get_pageflags((unsigned long)map + page_size);
253 if (!is_vmflag_set((unsigned long)map + page_size, LOCKED)) {
263 unsigned long page_size = getpagesize(); local
267 page2_flags = get_pageflags((unsigned long)map + page_size);
281 if (is_vmflag_set((unsigned long)map + page_size, LOCKED)) {
293 unsigned long page_size = getpagesize(); local
295 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE,
302 if (mlock2_(map, 2 * page_size, 0)) {
315 if (munlock(map, 2 * page_size)) {
330 unsigned long page_size = getpagesize(); local
378 unsigned long page_size = getpagesize(); local
402 unsigned long page_size = getpagesize(); local
444 unsigned long page_size = getpagesize(); local
492 unsigned long page_size = getpagesize(); local
570 unsigned long page_size = getpagesize(); local
[all...]
/external/linux-kselftest/tools/testing/selftests/powerpc/primitives/
H A Dload_unaligned_zeropad.c42 static int page_size; variable
47 if (mprotect(mem_region + page_size, page_size, PROT_NONE)) {
57 if (mprotect(mem_region + page_size, page_size, PROT_READ|PROT_WRITE)) {
137 page_size = getpagesize();
138 mem_region = mmap(NULL, page_size * 2, PROT_READ|PROT_WRITE,
143 for (i = 0; i < page_size; i++)
146 memset(mem_region+page_size, 0, page_size);
[all...]
/external/ltp/testcases/kernel/syscalls/writev/
H A Dwritev06.c57 int page_size; variable
174 page_size = getpagesize();
178 bad_addr[0] = mmap(NULL, page_size * 3, PROT_NONE,
183 good_addr[0] = mmap(NULL, page_size, PROT_READ | PROT_WRITE,
188 bad_addr[1] = mmap(NULL, page_size * 3, PROT_NONE,
193 good_addr[1] = mmap(NULL, page_size, PROT_READ | PROT_WRITE,
199 memset(good_addr[0], 'a', page_size);
200 memset(good_addr[1], 'b', page_size);
202 wr_iovec[0].iov_base = good_addr[0] + page_size - 1;
203 wr_iovec[1].iov_base = good_addr[1] + page_size
[all...]
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/
H A D24-2.c45 unsigned long page_size = sysconf(_SC_PAGE_SIZE); local
47 shm_size = 2 * page_size;
83 if ((unsigned long)addr % page_size) {
85 addr += page_size;
86 addr = (void *)((unsigned long)addr & ~(page_size - 1));
88 if (len % page_size) {
90 len &= ~(page_size - 1);
/external/v8/src/base/
H A Dsys-info.cc65 int pages, page_size;
68 sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
69 if (pages == -1 || page_size == -1) {
72 return static_cast<int64_t>(pages) * page_size;
93 long page_size = sysconf(_SC_PAGESIZE); // NOLINT(runtime/int)
94 if (pages == -1 || page_size == -1) {
97 return static_cast<int64_t>(pages) * page_size;

Completed in 1103 milliseconds

123456