/glibc-2.36/string/ |
D | test-memcpy-support.h | 83 if (align1 + len >= page_size) in do_test() 87 if (align2 + len >= page_size) in do_test() 111 align1 &= (page_size - 1); in do_test1() 113 align1 = page_size; in do_test1() 115 align2 &= (page_size - 1); in do_test1() 117 align2 = page_size; in do_test1() 119 region_size = (size + page_size - 1) & (~(page_size - 1)); in do_test1() 121 mmap_size = region_size * 2 + 3 * page_size; in do_test1() 129 if (mprotect (large_buf + region_size + page_size, page_size, PROT_NONE)) in do_test1() 134 unaligned_uint32_t *src = large_buf + region_size + 2 * page_size + align2; in do_test1() [all …]
|
D | test-string.h | 81 size_t page_size; variable 194 page_size = 2 * getpagesize (); in test_init() 196 if (page_size < MIN_PAGE_SIZE) in test_init() 197 page_size = MIN_PAGE_SIZE; in test_init() 199 buf1 = mmap (0, (BUF1PAGES + 1) * page_size, PROT_READ | PROT_WRITE, in test_init() 203 if (mprotect (buf1 + BUF1PAGES * page_size, page_size, PROT_NONE)) in test_init() 205 buf2 = mmap (0, 2 * page_size, PROT_READ | PROT_WRITE, in test_init() 209 if (mprotect (buf2 + page_size, page_size, PROT_NONE)) in test_init() 217 memset (buf1, 0xa5, BUF1PAGES * page_size); in test_init() 218 memset (buf2, 0x5a, page_size); in test_init()
|
D | test-strcmp.c | 147 if (align1 + (len + 1) * CHARBYTES >= page_size) in do_test() 151 if (align2 + (len + 1) * CHARBYTES >= page_size) in do_test() 156 s1 = (CHAR *)(buf1 + ((page_size - i) / 16 * 16) + align1); in do_test() 158 s2 = (CHAR *)(buf2 + ((page_size - i) / 16 * 16) + align2); in do_test() 176 UCHAR *p1 = (UCHAR *) (buf1 + page_size - 512 * CHARBYTES); in do_random_tests() 177 UCHAR *p2 = (UCHAR *) (buf2 + page_size - 512 * CHARBYTES); in do_random_tests() 340 CHAR *s1 = (CHAR *) (buf1 + (BUF1PAGES - 1) * page_size); in check2() 341 CHAR *s2 = (CHAR *) (buf2 + (BUF1PAGES - 1) * page_size); in check2() 344 memset (s1, 'a', page_size); in check2() 345 memset (s2, 'a', page_size); in check2() [all …]
|
D | test-strncmp.c | 132 s1 = (CHAR *) (buf1 + page_size); in do_test_limit() 133 s2 = (CHAR *) (buf2 + page_size); in do_test_limit() 143 align_n = (page_size - n * CHARBYTES) & 15; in do_test_limit() 145 s1 = (CHAR *) (buf1 + page_size - n * CHARBYTES); in do_test_limit() 146 s2 = (CHAR *) (buf2 + page_size - n * CHARBYTES); in do_test_limit() 187 if (align1 + (buf_bound + 2) * CHARBYTES >= page_size) in do_test_n() 191 if (align2 + (buf_bound + 2) * CHARBYTES >= page_size) in do_test_n() 239 if (offset1 * CHARBYTES >= page_size || offset2 * CHARBYTES >= page_size) in do_page_test() 250 check_result (impl, s1, s2, page_size, -exp_result); in do_page_test() 251 check_result (impl, s2, s1, page_size, exp_result); in do_page_test() [all …]
|
D | test-memmem.c | 94 do_one_test (impl, buf1, BUF1PAGES * page_size, str, len, buf1 + idx); in do_test() 108 size_t idx = MIN ((2 << shift) * 64 + rel, BUF1PAGES * page_size - 2); in do_random_tests() 110 len = MIN (len, BUF1PAGES * page_size - idx - 1); in do_random_tests() 121 do_one_test (impl, buf1, BUF1PAGES * page_size, buf1 + idx, len, in do_random_tests() 134 void *search_buf = (void *) buf1 + page_size - sizeof search_buf_data; in check1() 167 for (i = 0; i < BUF1PAGES * page_size; ++i) in test_main()
|
D | test-strncpy.c | 119 if ((align1 + len) * sizeof (CHAR) >= page_size) in do_test() 123 if ((align2 + len) * sizeof (CHAR) >= page_size) in do_test() 132 for (i = len + 1; (i + align1) * sizeof (CHAR) < page_size && i < len + 64; in do_test() 147 s1 = (CHAR *) buf1 + BUF1PAGES * page_size / sizeof(CHAR) - maxoffset; in do_page_tests() 150 s2 = (CHAR *) buf2 + page_size / sizeof(CHAR) - maxoffset * 2; in do_page_tests() 178 UCHAR *p1 = (UCHAR *) (buf1 + page_size) - 512; in do_random_tests() 179 UCHAR *p2 = (UCHAR *) (buf2 + page_size) - 512; in do_random_tests()
|
D | test-strnlen.c | 77 if ((align + len) * sizeof (CHAR) >= page_size) in do_test() 132 CHAR *p = (CHAR *) (buf1 + page_size - 512 * sizeof (CHAR)); in do_random_tests() 191 size_t last_offset = (page_size / sizeof (CHAR)) - 1; in do_page_tests() 211 do_one_test (impl, (CHAR *) (s + offset), page_size, exp_len); in do_page_tests() 232 do_one_test (impl, (CHAR *) (s + offset), page_size, exp_len); in do_page_tests() 244 size_t last_offset = page_size / sizeof (CHAR); in do_page_2_tests()
|
D | test-memccpy.c | 70 if (align1 + len >= page_size) in do_test() 74 if (align2 + len >= page_size) in do_test() 87 for (i = len; i + align1 < page_size && i < len + 64; ++i) in do_test() 98 unsigned char *p1 = buf1 + page_size - 512; in do_random_tests() 99 unsigned char *p2 = buf2 + page_size - 512; in do_random_tests()
|
D | test-memcmp.c | 124 if (align1 + (len + 1) * CHARBYTES >= page_size) in do_test() 128 if (align2 + (len + 1) * CHARBYTES >= page_size) in do_test() 151 UCHAR *p1 = (UCHAR *) (buf1 + page_size - 512 * CHARBYTES); in do_random_tests() 152 UCHAR *p2 = (UCHAR *) (buf2 + page_size - 512 * CHARBYTES); in do_random_tests() 463 size_t max_length = page_size / sizeof (CHAR); in check2() 467 memcpy (buf2, buf1, page_size); in check2() 468 ((char *) buf2)[page_size - 1] ^= 0x11; in check2()
|
D | test-memcpy.c | 47 if (size > page_size) in do_random_tests() 48 size = page_size; in do_random_tests() 79 p1 = buf1 + page_size - size1; in do_random_tests() 80 p2 = buf2 + page_size - size2; in do_random_tests()
|
D | test-strcpy.c | 102 if ((align1 + len) * sizeof (CHAR) >= page_size) in do_test() 106 if ((align2 + len) * sizeof (CHAR) >= page_size) in do_test() 124 UCHAR *p1 = (UCHAR *) (buf1 + page_size) - 512; in do_random_tests() 125 UCHAR *p2 = (UCHAR *) (buf2 + page_size) - 512; in do_random_tests()
|
D | test-memmove.c | 104 if (align1 + len >= page_size) in do_test() 108 if (align2 + len >= page_size) in do_test() 138 if (size > page_size) in do_random_tests() 139 size = page_size; in do_random_tests() 161 p1 = buf1 + page_size - size; in do_random_tests() 162 p2 = buf2 + page_size - size; in do_random_tests()
|
D | test-strncat.c | 106 if ((align1 + len1) * sizeof (CHAR) >= page_size) in do_test() 108 if ((align1 + n) * sizeof (CHAR) > page_size) in do_test() 111 if ((align2 + len1 + len2) * sizeof (CHAR) >= page_size) in do_test() 113 if ((align2 + len1 + n) * sizeof (CHAR) > page_size) in do_test() 196 UCHAR *p1 = (UCHAR *) (buf1 + page_size) - 512; in do_random_tests() 197 UCHAR *p2 = (UCHAR *) (buf2 + page_size) - 512; in do_random_tests()
|
/glibc-2.36/benchtests/ |
D | bench-strncmp.c | 102 align_n = (page_size - n * CHARBYTES) & 15; in do_test_limit() 114 s1 = (CHAR *) (buf1 + page_size - n * CHARBYTES); in do_test_limit() 115 s2 = (CHAR *) (buf2 + page_size - n * CHARBYTES); in do_test_limit() 154 if (align1 + (n + 1) * CHARBYTES >= page_size) in do_test() 158 if (align2 + (n + 1) * CHARBYTES >= page_size) in do_test() 221 CHAR *s1 = (CHAR *) (buf1 + (BUF1PAGES - 1) * page_size); in do_test_page_boundary() 222 CHAR *s2 = (CHAR *) (buf2 + (BUF1PAGES - 1) * page_size); in do_test_page_boundary() 225 memset (s1, 'a', page_size); in do_test_page_boundary() 226 memset (s2, 'a', page_size); in do_test_page_boundary() 228 s1[(page_size / CHARBYTES) - 1] = (CHAR) 0; in do_test_page_boundary() [all …]
|
D | bench-strcmp.c | 116 if (align1 + (len + 1) * CHARBYTES >= page_size) in do_test() 120 if (align2 + (len + 1) * CHARBYTES >= page_size) in do_test() 127 align1 = ((page_size - i) / 16 * 16) + align1; in do_test() 129 align2 = ((page_size - i) / 16 * 16) + align2; in do_test() 181 CHAR *s1 = (CHAR *) (buf1 + (BUF1PAGES - 1) * page_size); in do_test_page_boundary() 182 CHAR *s2 = (CHAR *) (buf2 + (BUF1PAGES - 1) * page_size); in do_test_page_boundary() 185 memset (s1, 'a', page_size); in do_test_page_boundary() 186 memset (s2, 'a', page_size); in do_test_page_boundary() 188 s1[(page_size / CHARBYTES) - 1] = (CHAR) 0; in do_test_page_boundary() 189 s2[(page_size / CHARBYTES) - 1] = (CHAR) 0; in do_test_page_boundary() [all …]
|
D | bench-string.h | 239 static size_t buf1_size, buf2_size, page_size; variable 244 page_size = 2 * getpagesize (); in init_sizes() 246 if (page_size < MIN_PAGE_SIZE) in init_sizes() 247 page_size = MIN_PAGE_SIZE; in init_sizes() 250 buf1_size = BUF1PAGES * page_size; in init_sizes() 251 buf2_size = page_size; in init_sizes() 264 size_t alloc_size = size + page_size; in alloc_buf() 278 if (mprotect (buf + size, page_size, PROT_NONE)) in alloc_buf()
|
D | bench-memmem.c | 142 json_attr_uint (json_ctx, "len_haystack", BUF1PAGES * page_size); in do_test() 151 do_one_test (json_ctx, impl, buf1, BUF1PAGES * page_size, str, len, in do_test() 169 size_t idx = MIN ((2 << shift) * 64 + rel, BUF1PAGES * page_size - 2); in do_random_tests() 171 len = MIN (len, BUF1PAGES * page_size - idx - 1); in do_random_tests() 182 json_attr_uint (json_ctx, "len_haystack", BUF1PAGES * page_size); in do_random_tests() 191 do_one_test (json_ctx, impl, buf1, BUF1PAGES * page_size, buf1 + idx, in do_random_tests() 231 for (i = 0; i < BUF1PAGES * page_size; ++i) in test_main()
|
D | bench-strncat.c | 102 if ((align1 + len1) * sizeof (CHAR) >= page_size) in do_test() 104 if ((align1 + n) * sizeof (CHAR) > page_size) in do_test() 107 if ((align2 + len1 + len2) * sizeof (CHAR) >= page_size) in do_test() 109 if ((align2 + len1 + n) * sizeof (CHAR) > page_size) in do_test()
|
D | bench-memccpy.c | 67 if (align1 + len >= page_size) in do_test() 71 if (align2 + len >= page_size) in do_test() 84 for (i = len; i + align1 < page_size && i < len + 64; ++i) in do_test()
|
/glibc-2.36/support/ |
D | next_to_fault.c | 28 long page_size = sysconf (_SC_PAGE_SIZE); in support_next_to_fault_allocate() local 29 TEST_VERIFY_EXIT (page_size > 0); in support_next_to_fault_allocate() 31 result.region_size = roundup (size, page_size) + page_size; in support_next_to_fault_allocate() 32 if (size + page_size <= size || result.region_size <= size) in support_next_to_fault_allocate() 38 xmprotect (result.region_start + (result.region_size - page_size), in support_next_to_fault_allocate() 39 page_size, PROT_NONE); in support_next_to_fault_allocate() 42 result.buffer = result.region_start + result.region_size - page_size - size; in support_next_to_fault_allocate()
|
D | blob_repeat.c | 109 minimum_stride_size (size_t page_size, size_t element_size) in minimum_stride_size() argument 111 TEST_VERIFY_EXIT (page_size > 0); in minimum_stride_size() 115 unsigned int common_zeros = __builtin_ctzll (page_size | element_size); in minimum_stride_size() 121 if (__builtin_mul_overflow (page_size >> common_zeros, element_size, in minimum_stride_size() 134 unsigned long page_size = xsysconf (_SC_PAGESIZE); in allocate_big() local 135 size_t stride_size = minimum_stride_size (page_size, element_size); in allocate_big() 181 TEST_VERIFY_EXIT ((stride_size % page_size) == 0); in allocate_big()
|
/glibc-2.36/sysdeps/unix/sysv/linux/ |
D | tst-process_madvise.c | 36 static long int page_size; variable 50 void *p1 = xmmap (NULL, page_size * 2, PROT_READ | PROT_WRITE, in subprocess() 53 void *p2 = xmmap (NULL, page_size, PROT_READ | PROT_WRITE, in subprocess() 55 xmunmap(p2, page_size); in subprocess() 57 xsendto (sockets[1], &(struct iovec) { p1, page_size * 2 }, in subprocess() 60 xsendto (sockets[1], &(struct iovec) { p2, page_size }, in subprocess() 71 page_size = sysconf (_SC_PAGE_SIZE); in do_test() 105 2 * page_size); in do_test()
|
/glibc-2.36/malloc/ |
D | tst-malloc-thread-fail.c | 43 static unsigned long page_size; variable 130 return (struct allocate_result) {p, page_size}; in allocate_1() 135 return (struct allocate_result) {p, page_size}; in allocate_1() 329 page_size = ret; in do_test() 363 unsigned long stack_size = ((256 * 1024) / page_size) * page_size; in do_test() 364 if (stack_size < 4 * page_size) in do_test() 365 stack_size = 8 * page_size; in do_test() 397 allocation_size = page_size; in do_test() 404 allocation_size = page_size; in do_test() 407 allocation_size = 17 * page_size; in do_test()
|
/glibc-2.36/sysdeps/unix/sysv/linux/i386/ |
D | tst-bz21269.c | 92 long page_size = sysconf (_SC_PAGE_SIZE); in setup_counter_page() local 93 TEST_VERIFY_EXIT (page_size > 0); in setup_counter_page() 94 unsigned int *page = xmmap (NULL, page_size, PROT_READ | PROT_WRITE, in setup_counter_page() 96 for (int i = 0; i < (page_size / sizeof (unsigned int)); i++) in setup_counter_page()
|
/glibc-2.36/sysdeps/x86_64/x32/ |
D | tst-size_t-memcmp-2.c | 55 parameter_t dest = { { page_size / sizeof (CHAR) }, buf1 }; in test_main() 58 memcpy (buf1, buf2, page_size); in test_main() 61 p[page_size / sizeof (CHAR) - 1] = (CHAR) 1; in test_main()
|