/glibc-2.36/stdlib/ |
D | mul_n.c | 52 impn_mul_n_basecase (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size) in impn_mul_n_basecase() argument 64 MPN_COPY (prodp, up, size); in impn_mul_n_basecase() 66 MPN_ZERO (prodp, size); in impn_mul_n_basecase() 70 cy_limb = mpn_mul_1 (prodp, up, size, v_limb); in impn_mul_n_basecase() 72 prodp[size] = cy_limb; in impn_mul_n_basecase() 77 for (i = 1; i < size; i++) in impn_mul_n_basecase() 84 cy_limb = mpn_add_n (prodp, prodp, up, size); in impn_mul_n_basecase() 87 cy_limb = mpn_addmul_1 (prodp, up, size, v_limb); in impn_mul_n_basecase() 89 prodp[size] = cy_limb; in impn_mul_n_basecase() 96 mp_srcptr up, mp_srcptr vp, mp_size_t size, mp_ptr tspace) in impn_mul_n() argument [all …]
|
D | qsort.c | 28 #define SWAP(a, b, size) \ argument 31 size_t __size = (size); \ 88 _quicksort (void *const pbase, size_t total_elems, size_t size, in _quicksort() argument 93 const size_t max_thresh = MAX_THRESH * size; in _quicksort() 102 char *hi = &lo[size * (total_elems - 1)]; in _quicksort() 119 char *mid = lo + size * ((hi - lo) / size >> 1); in _quicksort() 122 SWAP (mid, lo, size); in _quicksort() 124 SWAP (mid, hi, size); in _quicksort() 128 SWAP (mid, lo, size); in _quicksort() 131 left_ptr = lo + size; in _quicksort() [all …]
|
D | tst-qsort2.c | 29 test (size_t nmemb, size_t size) in test() argument 31 array = malloc (nmemb * size); in test() 34 printf ("%zd x %zd: no memory", nmemb, size); in test() 38 array_end = array + nmemb * size; in test() 39 member_size = size; in test() 44 for (i = 0, p = array; i < nmemb; i++, p += size) in test() 47 if (size > 1) in test() 51 qsort (array, nmemb, size, compare); in test() 53 for (i = 0, p = array; i < nmemb - 1; i++, p += size) in test() 55 if (p[0] < p[size] in test() [all …]
|
D | tst-arc4random-thread.c | 51 unsigned int size; member 64 generate_arc4random (unsigned char *bytes, size_t size) in generate_arc4random() argument 67 for (i = 0; i < size / sizeof (uint32_t); i++) in generate_arc4random() 72 int rem = size % sizeof (uint32_t); in generate_arc4random() 81 generate_arc4random_buf (unsigned char *bytes, size_t size) in generate_arc4random_buf() argument 83 arc4random_buf (bytes, size); in generate_arc4random_buf() 87 generate_arc4random_uniform (unsigned char *bytes, size_t size) in generate_arc4random_uniform() argument 89 for (int i = 0; i < size; i++) in generate_arc4random_uniform() 106 if (left->size != right->size) in compare_blob() 108 return left->size - right->size; in compare_blob() [all …]
|
/glibc-2.36/malloc/ |
D | mcheck-impl.c | 37 size_t size; /* Exact size requested by user. */ member 58 flood (void *ptr, int val, size_t size) in flood() argument 61 while (size--) in flood() 86 if (((char *) &hdr[1])[hdr->size] != MAGICBYTE) in checkhdr() 181 flood (ptr, FREEFLOOD, hdr->size); in free_mcheck() 190 size_t size = *sizep; in malloc_mcheck_before() local 195 if (size > ~((size_t) 0) - (sizeof (struct hdr) + 1)) in malloc_mcheck_before() 202 *sizep = sizeof (struct hdr) + size + 1; in malloc_mcheck_before() 207 malloc_mcheck_after (void *mem, size_t size) in malloc_mcheck_after() argument 214 hdr->size = size; in malloc_mcheck_after() [all …]
|
D | tst-safe-linking.c | 82 size_t size = TCACHE_ALLOC_SIZE; in test_tcache() local 87 void * volatile a = malloc (size); in test_tcache() 88 void * volatile b = malloc (size); in test_tcache() 89 void * volatile c = malloc (size); in test_tcache() 97 memset (c, mask & 0xFF, size); in test_tcache() 100 c = malloc (size); in test_tcache() 103 b = malloc (size); in test_tcache() 113 size_t size = TCACHE_ALLOC_SIZE; in test_fastbin() local 120 void * volatile p = calloc (1, size); in test_fastbin() 126 void * volatile a = calloc (1, size); in test_fastbin() [all …]
|
D | tst-malloc-too-large.c | 70 test_large_allocations (size_t size) in test_large_allocations() argument 81 TEST_VERIFY (malloc (size) == NULL); in test_large_allocations() 93 TEST_VERIFY (realloc (ptr_to_realloc, size) == NULL); in test_large_allocations() 109 if ((size % nmemb) == 0) in test_large_allocations() 112 TEST_VERIFY (calloc (nmemb, size / nmemb) == NULL); in test_large_allocations() 116 TEST_VERIFY (calloc (size / nmemb, nmemb) == NULL); in test_large_allocations() 122 TEST_VERIFY (reallocarray (ptr_to_realloc, nmemb, size / nmemb) == NULL); in test_large_allocations() 137 TEST_VERIFY (reallocarray (ptr_to_realloc, size / nmemb, nmemb) == NULL); in test_large_allocations() 161 test_large_aligned_allocations (size_t size) in test_large_aligned_allocations() argument 180 TEST_VERIFY (memalign (align, size) == NULL); in test_large_aligned_allocations() [all …]
|
D | arena.c | 79 size_t size; /* Current size in bytes. */ member 138 #define arena_get(ptr, size) do { \ argument 140 arena_lock (ptr, size); \ 143 #define arena_lock(ptr, size) do { \ argument 147 ptr = arena_get2 ((size), NULL); \ 444 fprintf (stderr, "Heap %p, size %10lx:\n", heap, (long) heap->size); in dump_heap() 482 alloc_new_heap (size_t size, size_t top_pad, size_t pagesize, in alloc_new_heap() argument 491 if (size + top_pad < min_size) in alloc_new_heap() 492 size = min_size; in alloc_new_heap() 493 else if (size + top_pad <= max_size) in alloc_new_heap() [all …]
|
D | malloc.c | 454 tag_region (void *ptr, size_t size) in tag_region() argument 457 return __libc_mtag_tag_region (ptr, size); in tag_region() 462 tag_new_zero_region (void *ptr, size_t size) in tag_new_zero_region() argument 465 return __libc_mtag_tag_zero_region (__libc_mtag_new_tag (ptr), size); in tag_new_zero_region() 466 return memset (ptr, 0, size); in tag_new_zero_region() 1133 #define MMAP(addr, size, prot, flags) \ argument 1134 __mmap((addr), (size), (prot), (flags)|MAP_ANONYMOUS|MAP_PRIVATE, -1, 0) 2017 madvise_thp (void *p, INTERNAL_SIZE_T size) in madvise_thp() argument 2022 if (mp_.thp_pagesize == 0 || size < mp_.thp_pagesize) in madvise_thp() 2030 size += PTR_DIFF (p, q); in madvise_thp() [all …]
|
D | tst-mallocstate.c | 178 unsigned int size; member 187 size_t size = alloc->size; in check_allocation() local 191 size, index, alloc->seed); in check_allocation() 197 if (size > sizeof (expected)) in check_allocation() 200 size, index, alloc->seed); in check_allocation() 204 randomize_buffer (expected, size, alloc->seed); in check_allocation() 205 if (memcmp (alloc->data, expected, size) != 0) in check_allocation() 208 index, size, alloc->seed); in check_allocation() 210 dump_hex (expected, size); in check_allocation() 213 dump_hex (alloc->data, size); in check_allocation() [all …]
|
/glibc-2.36/include/ |
D | inline-hashtab.h | 33 size_t size; member 51 ht->size = 3; in htab_create() 52 ht->entries = malloc (sizeof (void *) * ht->size); in htab_create() 62 memset (ht->entries, 0, sizeof (void *) * ht->size); in htab_create() 74 for (i = htab->size - 1; i >= 0; i--) in htab_delete() 91 size_t size = htab->size; in find_empty_slot_for_expand() local 92 unsigned int index = hash % size; in find_empty_slot_for_expand() 99 hash2 = 1 + hash % (size - 2); in find_empty_slot_for_expand() 103 if (index >= size) in find_empty_slot_for_expand() 104 index -= size; in find_empty_slot_for_expand() [all …]
|
D | alloc_buffer.h | 116 void __libc_alloc_buffer_create_failure (void *start, size_t size); 123 alloc_buffer_create (void *start, size_t size) in alloc_buffer_create() argument 126 uintptr_t end = (uintptr_t) start + size; in alloc_buffer_create() 128 __libc_alloc_buffer_create_failure (start, size); in alloc_buffer_create() 133 struct alloc_buffer __libc_alloc_buffer_allocate (size_t size, void **pptr) 141 struct alloc_buffer alloc_buffer_allocate (size_t size, void **pptr) in alloc_buffer_allocate() argument 143 return __libc_alloc_buffer_allocate (size, pptr); in alloc_buffer_allocate() 206 __alloc_buffer_assert_size (size_t size) in __alloc_buffer_assert_size() argument 208 if (!__builtin_constant_p (size)) in __alloc_buffer_assert_size() 213 else if (size == 0) in __alloc_buffer_assert_size() [all …]
|
D | libc-pointer-arith.h | 46 #define ALIGN_DOWN(base, size) ((base) & -((__typeof__ (base)) (size))) argument 53 #define ALIGN_UP(base, size) ALIGN_DOWN ((base) + (size) - 1, (size)) argument 56 #define PTR_ALIGN_DOWN(base, size) \ argument 57 ((__typeof__ (base)) ALIGN_DOWN ((uintptr_t) (base), (size))) 60 #define PTR_ALIGN_UP(base, size) \ argument 61 ((__typeof__ (base)) ALIGN_UP ((uintptr_t) (base), (size))) 64 #define PTR_IS_ALIGNED(base, size) \ argument 65 ((((uintptr_t) (base)) & (size - 1)) == 0)
|
/glibc-2.36/stdio-common/ |
D | tst-vfprintf-mbs-prec.c | 238 enum { size = 20 }; in test_wide_result() enumerator 242 wmemset (buf, '@', size); in test_wide_result() 243 TEST_VERIFY (swprintf (buf, size, L"%s", "xyz") == 3); in test_wide_result() 247 wmemset (buf, '@', size); in test_wide_result() 248 TEST_VERIFY (swprintf (buf, size, L"%s", "x\xC3\x9Fz") == 3); in test_wide_result() 252 wmemset (buf, '@', size); in test_wide_result() 253 TEST_VERIFY (swprintf (buf, size, L"%.1s", "x\xC3\x9Fz") == 1); in test_wide_result() 255 wmemset (buf, '@', size); in test_wide_result() 256 TEST_VERIFY (swprintf (buf, size, L"%.2s", "x\xC3\x9Fz") == 2); in test_wide_result() 258 wmemset (buf, '@', size); in test_wide_result() [all …]
|
/glibc-2.36/libio/bits/ |
D | stdio.h | 147 # define fread_unlocked(ptr, size, n, stream) \ argument 148 (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ 149 && (size_t) (size) * (size_t) (n) <= 8 \ 150 && (size_t) (size) != 0) \ 154 for (__cnt = (size_t) (size) * (size_t) (n); \ 162 ((size_t) (size) * (size_t) (n) - __cnt) \ 163 / (size_t) (size); }) \ 164 : (((__builtin_constant_p (size) && (size_t) (size) == 0) \ 167 ? ((void) (ptr), (void) (stream), (void) (size), \ 169 : fread_unlocked (ptr, size, n, stream)))) [all …]
|
/glibc-2.36/nptl/ |
D | allocatestack.c | 60 size_t size = *sizep; in get_cached_stack() local 77 if (__nptl_stack_in_use (curr) && curr->stackblock_size >= size) in get_cached_stack() 79 if (curr->stackblock_size == size) in get_cached_stack() 94 || __builtin_expect (result->stackblock_size > 4 * size, 0)) in get_cached_stack() 148 guard_position (void *mem, size_t size, size_t guardsize, struct pthread *pd, in guard_position() argument 152 return mem + (((size - guardsize) / 2) & ~pagesize_m1); in guard_position() 163 setup_stack_prot (char *mem, size_t size, char *guard, size_t guardsize, in setup_stack_prot() argument 170 if (__mprotect (guardend, size - guardsize, prot) != 0) in setup_stack_prot() 176 size_t mprots2 = ((uintptr_t) mem + size) - (uintptr_t) guardend; in setup_stack_prot() 186 advise_stack_range (void *mem, size_t size, uintptr_t pd, size_t guardsize) in advise_stack_range() argument [all …]
|
/glibc-2.36/sysdeps/unix/sysv/linux/ |
D | tst-skeleton-affinity.c | 58 size_t size = CPU_ALLOC_SIZE (num_cpus); in find_set_size() local 65 if (getaffinity (size, set) == 0) in find_set_size() 83 find_last_cpu (const cpu_set_t *set, size_t size) in find_last_cpu() argument 90 size_t total_cpus = CPU_COUNT_S (size, set); in find_last_cpu() 95 if (CPU_ISSET_S (cpu, size, set)) in find_last_cpu() 133 test_size (const struct conf *conf, size_t size) in test_size() argument 135 if (size < conf->set_size) in test_size() 137 printf ("info: Test not run for CPU set size %zu\n", size); in test_size() 141 cpu_set_t *initial_set = CPU_ALLOC (size); in test_size() 142 cpu_set_t *set2 = CPU_ALLOC (size); in test_size() [all …]
|
/glibc-2.36/string/ |
D | test-memmove.c | 124 size_t i, n, align1, align2, len, size; in do_random_tests() local 135 size = 65536; in do_random_tests() 137 size = 512; in do_random_tests() 138 if (size > page_size) in do_random_tests() 139 size = page_size; in do_random_tests() 142 len = random () & (size - 1); in do_random_tests() 143 align1 = size - len - (random () & 31); in do_random_tests() 144 align2 = size - len - (random () & 31); in do_random_tests() 145 if (align1 > size) in do_random_tests() 147 if (align2 > size) in do_random_tests() [all …]
|
/glibc-2.36/elf/ |
D | dl-find_object.c | 118 size_t size; /* Read in the TM region. */ member 137 for (; seg != NULL && seg->size > 0; seg = seg->previous) in _dlfo_mappings_segment_count_used() 138 for (size_t i = 0; i < seg->size; ++i) in _dlfo_mappings_segment_count_used() 166 _dlfo_mappings_segment_allocate_unpadded (size_t size) in _dlfo_mappings_segment_allocate_unpadded() argument 168 if (size < dlfo_mappings_initial_segment_size) in _dlfo_mappings_segment_allocate_unpadded() 169 size = dlfo_mappings_initial_segment_size; in _dlfo_mappings_segment_allocate_unpadded() 177 + size * element_size); in _dlfo_mappings_segment_allocate_unpadded() 183 result->size = 0; in _dlfo_mappings_segment_allocate_unpadded() 184 result->allocated = size; in _dlfo_mappings_segment_allocate_unpadded() 193 _dlfo_mappings_segment_allocate (size_t size, in _dlfo_mappings_segment_allocate() argument [all …]
|
/glibc-2.36/nss/nss_compat/ |
D | compat-initgroups.c | 67 int size; member 169 add_group (long int *start, long int *size, gid_t **groupsp, long int limit, in add_group() argument 175 if (__glibc_unlikely (*start == *size)) in add_group() 181 if (limit > 0 && *size == limit) in add_group() 186 newsize = 2 * *size; in add_group() 188 newsize = MIN (limit, 2 * *size); in add_group() 194 *size = newsize; in add_group() 206 long int *size, gid_t **groupsp, long int limit, in check_and_add_group() argument 218 add_group (start, size, groupsp, limit, grp->gr_gid); in check_and_add_group() 229 gid_t group, long int *start, long int *size, in getgrent_next_nss() argument [all …]
|
/glibc-2.36/sysdeps/mach/hurd/ |
D | ptrace.c | 46 error_t read_data (task_t task, vm_address_t *ourpage, vm_size_t *size) in ptrace() 50 *size = round_page (addr + data) - trunc_page (addr); in ptrace() 51 err = __vm_read (task, trunc_page (addr), *size, ourpage, size); in ptrace() 209 vm_size_t size; in ptrace() local 216 size = 0; in ptrace() 217 err = read_data (task, &ourpage, &size); in ptrace() 223 __vm_deallocate (__mach_task_self (), ourpage, size); in ptrace() 279 vm_size_t size; in ptrace() local 285 size = 0; in ptrace() 286 err = read_data (task, &ourpage, &size); in ptrace() [all …]
|
D | getcwd.c | 42 size_t size) in __hurd_canonicalize_directory_name_internal() argument 52 const size_t orig_size = size; in __hurd_canonicalize_directory_name_internal() 69 if (size <= 0) in __hurd_canonicalize_directory_name_internal() 77 size = FILENAME_MAX * 4 + 1; /* Good starting guess. */ in __hurd_canonicalize_directory_name_internal() 84 file_name = malloc (size); in __hurd_canonicalize_directory_name_internal() 89 file_namep = file_name + size; in __hurd_canonicalize_directory_name_internal() 235 size *= 2; in __hurd_canonicalize_directory_name_internal() 236 buf = realloc (file_name, size); in __hurd_canonicalize_directory_name_internal() 242 file_namep = &buf[file_namep - file_name + size / 2]; in __hurd_canonicalize_directory_name_internal() 246 memcpy (file_namep, file_namep - size / 2, in __hurd_canonicalize_directory_name_internal() [all …]
|
/glibc-2.36/scripts/ |
D | abilist.awk | 43 size = $5; 44 sub(/^0*/, "", size); 45 if (size == "") { 46 size = " 0x0"; 48 size = " 0x" size; 68 size = ""; 76 size = ""; 93 size = ""; 98 size = ""; 106 desc = symbol " " type size;
|
/glibc-2.36/libio/ |
D | obprintf.c | 42 int size; in _IO_obstack_overflow() local 52 size = obstack_room (obstack); in _IO_obstack_overflow() 53 fp->_IO_write_end = fp->_IO_write_ptr + size; in _IO_obstack_overflow() 55 obstack_blank_fast (obstack, size); in _IO_obstack_overflow() 68 int size; in _IO_obstack_xsputn() local 80 size = obstack_room (obstack); in _IO_obstack_xsputn() 81 fp->_IO_write_end = fp->_IO_write_ptr + size; in _IO_obstack_xsputn() 83 obstack_blank_fast (obstack, size); in _IO_obstack_xsputn() 127 int size; in __obstack_vprintf_internal() local 137 size = obstack_object_size (obstack) + room; in __obstack_vprintf_internal() [all …]
|
/glibc-2.36/grp/ |
D | initgroups.c | 46 internal_getgrouplist (const char *user, gid_t group, long int *size, in internal_getgrouplist() argument 56 int n = __nscd_getgrouplist (user, group, size, groupsp, limit); in internal_getgrouplist() 68 assert (*size > 0); in internal_getgrouplist() 98 status = compat_call (nip, user, group, &start, size, groupsp, in internal_getgrouplist() 101 status = DL_CALL_FCT (fct, (user, group, &start, size, groupsp, in internal_getgrouplist() 145 long int size = MAX (1, *ngroups); in getgrouplist() local 147 gid_t *newgroups = (gid_t *) malloc (size * sizeof (gid_t)); in getgrouplist() 156 int total = internal_getgrouplist (user, group, &size, &newgroups, -1); in getgrouplist() 183 long int size; in nss_interface_function() 195 size = MIN (limit, 64); in nss_interface_function() [all …]
|