/glibc-2.36/malloc/ |
D | tst-free-errno.c | 78 size_t pagesize = getpagesize (); in do_test() local 79 void *firstpage_backup = xmalloc (pagesize); in do_test() 80 void *lastpage_backup = xmalloc (pagesize); in do_test() 93 char *ptr_aligned = (char *) ((uintptr_t) ptr & ~(pagesize - 1)); in do_test() 98 memcpy (firstpage_backup, ptr_aligned, pagesize); in do_test() 99 memcpy (lastpage_backup, ptr_aligned + big_size - pagesize, in do_test() 100 pagesize); in do_test() 101 xmmap (ptr_aligned - pagesize, pagesize + big_size + pagesize, in do_test() 104 memcpy (ptr_aligned, firstpage_backup, pagesize); in do_test() 105 memcpy (ptr_aligned + big_size - pagesize, lastpage_backup, in do_test() [all …]
|
D | tst-memalign.c | 39 unsigned long pagesize = getpagesize (); in do_test() local 71 p = memalign (pagesize, -pagesize); in do_test() 86 p = memalign (-1, pagesize); in do_test()
|
D | tst-posix_memalign.c | 40 unsigned long pagesize = getpagesize (); in do_test() local 69 ret = posix_memalign (&p, pagesize, -pagesize); in do_test() 79 ret = posix_memalign (&p, -1, pagesize); in do_test()
|
D | arena.c | 82 size_t pagesize; /* Page size used when allocating the arena. */ member 482 alloc_new_heap (size_t size, size_t top_pad, size_t pagesize, in alloc_new_heap() argument 499 size = ALIGN_UP (size, pagesize); in alloc_new_heap() 556 h->pagesize = pagesize; in alloc_new_heap() 585 size_t pagesize = h->pagesize; in grow_heap() local 589 diff = ALIGN_UP (diff, pagesize); in grow_heap() 667 + heap->pagesize) in heap_trim() 680 assert (((unsigned long) ((char *) p + new_size) & (heap->pagesize - 1)) in heap_trim() 701 extra = ALIGN_DOWN(top_area - pad, heap->pagesize); in heap_trim()
|
D | malloc-debug.c | 151 static size_t pagesize; variable 309 if (!pagesize) in strong_alias() 310 pagesize = sysconf (_SC_PAGESIZE); in strong_alias() 314 pagesize - 1, in strong_alias() 320 rounded_bytes = rounded_bytes & -(pagesize - 1); in strong_alias() 322 return _debug_mid_memalign (pagesize, rounded_bytes, RETURN_ADDRESS (0)); in strong_alias() 329 if (!pagesize) in strong_alias() 330 pagesize = sysconf (_SC_PAGESIZE); in strong_alias() 332 return _debug_mid_memalign (pagesize, bytes, RETURN_ADDRESS (0)); in strong_alias()
|
D | tst-pvalloc.c | 39 unsigned long pagesize = getpagesize (); in do_test() local 71 p = pvalloc (-pagesize); in do_test() 100 if ((ptrval & (pagesize - 1)) != 0) in do_test()
|
D | tst-valloc.c | 39 unsigned long pagesize = getpagesize (); in do_test() local 71 p = valloc (-pagesize); in do_test() 100 if ((ptrval & (pagesize - 1)) != 0) in do_test()
|
D | tst-malloc-too-large.c | 154 static long pagesize; variable 174 for (align = 1; align <= pagesize; align *= 2) in test_large_aligned_allocations() 269 pagesize = sysconf (_SC_PAGESIZE); in do_test() 270 TEST_VERIFY_EXIT (powerof2 (pagesize)); in do_test()
|
D | malloc.c | 2414 sysmalloc_mmap (INTERNAL_SIZE_T nb, size_t pagesize, int extra_flags, mstate av) in sysmalloc_mmap() argument 2427 size = ALIGN_UP (nb + SIZE_SZ, pagesize); in sysmalloc_mmap() 2429 size = ALIGN_UP (nb + SIZE_SZ + MALLOC_ALIGN_MASK, pagesize); in sysmalloc_mmap() 2504 size_t pagesize, int extra_flags, mstate av) in sysmalloc_mmap_fallback() argument 2510 size = ALIGN_UP (size + old_size, pagesize); in sysmalloc_mmap_fallback() 2562 size_t pagesize = GLRO (dl_pagesize); in sysmalloc() local 2588 mm = sysmalloc_mmap (nb, pagesize, 0, av); in sysmalloc() 2614 ((unsigned long) old_end & (pagesize - 1)) == 0)); in sysmalloc() 2672 char *mm = sysmalloc_mmap (nb, pagesize, 0, av); in sysmalloc() 2746 mbrk = sysmalloc_mmap_fallback (&size, nb, old_size, pagesize, in sysmalloc() [all …]
|
/glibc-2.36/libio/ |
D | tst-mmap2-eofsync.c | 41 const size_t pagesize = getpagesize (); in do_test() local 43 char buf[pagesize]; in do_test() 54 if (fread (buf, pagesize, 1, f) != 1) in do_test() 60 if (memcmp (buf, pages, pagesize)) in do_test() 80 c = write (temp_fd, pages + pagesize, pagesize); in do_test() 81 if (c == (ssize_t) pagesize) in do_test() 85 printf ("wrote %d != %zd (%m)\n", c, pagesize); in do_test() 89 if (fread (buf, pagesize, 1, f) != 1) in do_test() 94 if (fread (buf, pagesize, 1, f) != 1) in do_test() 101 if (result == 0 && memcmp (buf, pages + pagesize, pagesize)) in do_test() [all …]
|
/glibc-2.36/sysdeps/unix/sysv/linux/ |
D | malloc-hugepages.c | 127 hugepage_flags (size_t pagesize) in hugepage_flags() argument 129 return MAP_HUGETLB | (__builtin_ctzll (pagesize) << MAP_HUGE_SHIFT); in hugepage_flags() 133 __malloc_hugepage_config (size_t requested, size_t *pagesize, int *flags) in __malloc_hugepage_config() argument 135 *pagesize = 0; in __malloc_hugepage_config() 140 *pagesize = malloc_default_hugepage_size (); in __malloc_hugepage_config() 141 if (*pagesize != 0) in __malloc_hugepage_config() 142 *flags = hugepage_flags (*pagesize); in __malloc_hugepage_config() 190 *pagesize = hpsize; in __malloc_hugepage_config() 191 *flags = hugepage_flags (*pagesize); in __malloc_hugepage_config()
|
D | tst-pkey.c | 173 long pagesize = xsysconf (_SC_PAGESIZE); in do_test() local 178 int *page = xmmap (NULL, pagesize, PROT_NONE, in do_test() 180 TEST_COMPARE (pkey_mprotect (page, pagesize, PROT_READ | PROT_WRITE, -1), in do_test() 185 xmunmap (page, pagesize); in do_test() 226 pages[i] = xmmap (NULL, pagesize, PROT_READ | PROT_WRITE, in do_test() 228 TEST_COMPARE (pkey_mprotect ((void *) pages[i], pagesize, in do_test() 399 xmunmap ((void *) pages[i], pagesize); in do_test()
|
/glibc-2.36/crypt/ |
D | badsalttest.c | 42 size_t pagesize = (size_t) sysconf (_SC_PAGESIZE); in do_test() local 47 page = mmap (NULL, pagesize * 2, PROT_READ | PROT_WRITE, in do_test() 56 if (mmap (page + pagesize, pagesize, 0, in do_test() 58 -1, 0) != page + pagesize) in do_test() 60 page[pagesize - 1] = '*'; in do_test() 61 tests[n - 1][1] = &page[pagesize - 1]; in do_test()
|
/glibc-2.36/posix/ |
D | tst-fnmatch3.c | 28 const int pagesize = getpagesize (); in do_bz18036() local 30 char *pattern = mmap (0, 2 * pagesize, PROT_READ|PROT_WRITE, in do_bz18036() 34 mprotect (pattern + pagesize, pagesize, PROT_NONE); in do_bz18036() 35 memset (pattern, ' ', pagesize); in do_bz18036()
|
D | test-errno.c | 93 size_t pagesize = sysconf (_SC_PAGESIZE); in do_test() local 141 mmap, 0, pagesize, PROT_READ, MAP_PRIVATE, -1, 0); in do_test() 142 fails |= test_wrp (EINVAL, mprotect, (void *) -1, pagesize, -1); in do_test() 143 fails |= test_wrp (EINVAL, msync, (void *) -1, pagesize, -1); in do_test()
|
/glibc-2.36/nptl/ |
D | tst-pthread-getattr.c | 44 static size_t pagesize; variable 93 uintptr_t pagemask = ~(pagesize - 1); in check_stack_top() 117 stack_limit.rlim_cur = MIN (stacksize - pagesize + 1, MAX_STACK_SIZE); in check_stack_top() 136 uintptr_t mem = allocate_and_test (stackaddr + pagesize / 2); in check_stack_top() 160 pagesize = sysconf (_SC_PAGESIZE); in do_test()
|
D | tst-default-attr.c | 286 long int pagesize = sysconf (_SC_PAGESIZE); in do_guardsize_test() local 289 if (pagesize < 0) in do_guardsize_test() 299 guardsize += pagesize; in do_guardsize_test() 325 long int pagesize = sysconf (_SC_PAGESIZE); in do_stacksize_test() local 328 if (pagesize < 0) in do_stacksize_test() 338 stacksize += pagesize; in do_stacksize_test()
|
/glibc-2.36/support/ |
D | support_stack_alloc.c | 38 size_t pagesize = sysconf (_SC_PAGESIZE); in support_stack_alloc() local 39 if (pagesize == -1) in support_stack_alloc() 46 pagesize); in support_stack_alloc() 56 size_t guardsize = roundup (MAX (2 * stacksize, 1024 * 1024), pagesize); in support_stack_alloc()
|
/glibc-2.36/dlfcn/ |
D | tststatic5.c | 34 int pagesize = getpagesize (); in do_test() local 57 if (my_pagesize != pagesize) in do_test() 59 printf ("my_getpagesize: got %i, expected %i\n", my_pagesize, pagesize); in do_test()
|
/glibc-2.36/stdlib/ |
D | msort.c | 182 static int pagesize; in __qsort_r() local 184 if (pagesize == 0) in __qsort_r() 202 pagesize = __sysconf (_SC_PAGESIZE); in __qsort_r() 213 if (size / pagesize > (size_t) phys_pages) in __qsort_r()
|
/glibc-2.36/sysdeps/generic/ |
D | malloc-hugepages.c | 35 __malloc_hugepage_config (size_t requested, size_t *pagesize, int *flags) in __malloc_hugepage_config() argument 37 *pagesize = 0; in __malloc_hugepage_config()
|
D | malloc-hugepages.h | 41 void __malloc_hugepage_config (size_t requested, size_t *pagesize, int *flags)
|
/glibc-2.36/string/ |
D | test-strlen.c | 164 size_t pagesize = getpagesize () / sizeof (CHAR); in test_main() local 169 do_test (pagesize - i, i - 1); in test_main() 171 do_test (pagesize - i, maxlength); in test_main()
|
/glibc-2.36/mach/ |
D | mach_init.c | 49 __vm_page_size = stats.pagesize; in weak_alias()
|
/glibc-2.36/elf/ |
D | sprof.c | 412 size_t pagesize = getpagesize (); in load_shobj() local 453 ElfW(Addr) start = (ph->p_vaddr & ~(pagesize - 1)); in load_shobj() 454 ElfW(Addr) end = ((ph->p_vaddr + ph->p_memsz + pagesize - 1) in load_shobj() 455 & ~(pagesize - 1)); in load_shobj() 701 min_offset = symtab_entry->sh_offset & ~(pagesize - 1); in load_shobj() 706 min_offset = strtab_entry->sh_offset & ~(pagesize - 1); in load_shobj()
|