Home
last modified time | relevance | path

Searched refs:size (Results 1 – 25 of 31) sorted by relevance

12

/malloc/
A Dtst-safe-linking.c82 size_t size = TCACHE_ALLOC_SIZE; in test_tcache() local
87 void * volatile a = 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
136 memset (c, mask & 0xFF, size); in test_fastbin()
139 c = calloc (1, size); in test_fastbin()
142 b = calloc (1, size); in test_fastbin()
152 size_t size = TCACHE_ALLOC_SIZE; in test_fastbin_consolidate() local
[all …]
A Dmcheck-impl.c61 while (size--) in flood()
190 size_t size = *sizep; in malloc_mcheck_before() local
214 hdr->size = size; in malloc_mcheck_after()
265 hdr->size = size; in memalign_mcheck_after()
278 size_t size = *sizep; in realloc_mcheck_before() local
288 if (size == 0) in realloc_mcheck_before()
312 osize = hdr->size; in realloc_mcheck_before()
316 if (size < osize) in realloc_mcheck_before()
317 flood ((char *) ptr + size, FREEFLOOD, osize - size); in realloc_mcheck_before()
336 hdr->size = size; in realloc_mcheck_after()
[all …]
A Dtst-malloc-too-large.c70 test_large_allocations (size_t size) in test_large_allocations() argument
81 TEST_VERIFY (malloc (size) == NULL); in test_large_allocations()
101 if ((size % nmemb) == 0) in test_large_allocations()
137 test_large_aligned_allocations (size_t size) in test_large_aligned_allocations() argument
172 if ((size % align) == 0) in test_large_aligned_allocations()
192 TEST_VERIFY (valloc (size) == NULL); in test_large_aligned_allocations()
202 TEST_VERIFY (pvalloc (size) == NULL); in test_large_aligned_allocations()
287 test_large_allocations (size); in do_test()
288 test_large_aligned_allocations (size); in do_test()
290 size = msbs << 50; in do_test()
[all …]
A Ddynarray_resize.c26 __libc_dynarray_resize (struct dynarray_header *list, size_t size, in __libc_dynarray_resize() argument
30 if (size <= list->allocated) in __libc_dynarray_resize()
32 list->used = size; in __libc_dynarray_resize()
41 if (INT_MULTIPLY_WRAPV (size, element_size, &new_size_bytes)) in __libc_dynarray_resize()
60 list->allocated = size; in __libc_dynarray_resize()
61 list->used = size; in __libc_dynarray_resize()
A Dtst-calloc.c32 fixed_test (int size) in fixed_test() argument
41 ptrs[i] = (char *) calloc (1, size); in fixed_test()
46 for (j = 0; j < size; ++j) in fixed_test()
51 size, i, j); in fixed_test()
72 int size = n * elem; in random_test() local
79 for (j = 0; j < size; ++j) in random_test()
84 size, i, j); in random_test()
A Dscratch_buffer_dupfree.c27 __libc_scratch_buffer_dupfree (struct scratch_buffer *buffer, size_t size) in __libc_scratch_buffer_dupfree() argument
32 void *copy = malloc (size); in __libc_scratch_buffer_dupfree()
33 return copy != NULL ? memcpy (copy, data, size) : NULL; in __libc_scratch_buffer_dupfree()
37 void *copy = realloc (data, size); in __libc_scratch_buffer_dupfree()
A Dtst-mallocstate.c178 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()
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()
258 .size = 1 + (i / action_count), in initial_allocations()
[all …]
A Darena.c492 size = min_size; in alloc_new_heap()
494 size += top_pad; in alloc_new_heap()
495 else if (size > max_size) in alloc_new_heap()
498 size = max_size; in alloc_new_heap()
499 size = ALIGN_UP (size, pagesize); in alloc_new_heap()
551 madvise_thp (p2, size); in alloc_new_heap()
554 h->size = size; in alloc_new_heap()
555 h->mprotect_size = size; in alloc_new_heap()
604 h->size = new_size; in grow_heap()
634 h->size = new_size; in shrink_heap()
[all …]
A Dscratch_buffer_set_array_size.c29 size_t nelem, size_t size) in __libc_scratch_buffer_set_array_size() argument
31 size_t new_length = nelem * size; in __libc_scratch_buffer_set_array_size()
34 if ((nelem | size) >> (sizeof (size_t) * CHAR_BIT / 2) != 0 in __libc_scratch_buffer_set_array_size()
35 && nelem != 0 && size != new_length / nelem) in __libc_scratch_buffer_set_array_size()
A Dalloc_buffer_alloc_array.c29 size_t size; in __libc_alloc_buffer_alloc_array() local
30 bool overflow = __builtin_mul_overflow (element_size, count, &size); in __libc_alloc_buffer_alloc_array()
31 size_t new_current = aligned + size; in __libc_alloc_buffer_alloc_array()
34 && new_current >= size /* No overflow in size computation. */ in __libc_alloc_buffer_alloc_array()
A Dtst-trim1.c15 size_t size = random () % 16384; in do_test() local
17 if ((arr[i] = malloc (size)) == NULL) in do_test()
24 memset (arr[i], size, size); in do_test()
A Dalloc_buffer_allocate.c24 __libc_alloc_buffer_allocate (size_t size, void **pptr) in __libc_alloc_buffer_allocate() argument
26 *pptr = malloc (size); in __libc_alloc_buffer_allocate()
34 return alloc_buffer_create (*pptr, size); in __libc_alloc_buffer_allocate()
A Dmtrace-impl.c103 malloc_mtrace_after (void *block, size_t size, const void *caller) in malloc_mtrace_after() argument
110 fprintf (mallstream, "+ %p %#lx\n", block, (unsigned long int) size); in malloc_mtrace_after()
116 realloc_mtrace_after (void *block, const void *oldptr, size_t size, in realloc_mtrace_after() argument
125 if (size != 0) in realloc_mtrace_after()
127 fprintf (mallstream, "! %p %#lx\n", oldptr, (unsigned long int) size); in realloc_mtrace_after()
132 fprintf (mallstream, "+ %p %#lx\n", block, (unsigned long int) size); in realloc_mtrace_after()
137 fprintf (mallstream, "> %p %#lx\n", block, (unsigned long int) size); in realloc_mtrace_after()
144 memalign_mtrace_after (void *block, size_t size, const void *caller) in memalign_mtrace_after() argument
151 fprintf (mallstream, "+ %p %#lx\n", block, (unsigned long int) size); in memalign_mtrace_after()
A Ddynarray_resize_clear.c23 __libc_dynarray_resize_clear (struct dynarray_header *list, size_t size, in __libc_dynarray_resize_clear() argument
27 if (!__libc_dynarray_resize (list, size, scratch, element_size)) in __libc_dynarray_resize_clear()
32 (size - old_size) * element_size); in __libc_dynarray_resize_clear()
A Dmalloc.c2422 long int size; in sysmalloc_mmap() local
2493 sum = atomic_exchange_and_add (&mp_.mmapped_mem, size) + size; in sysmalloc_mmap()
2516 size = ALIGN_UP (size + old_size, pagesize); in sysmalloc_mmap_fallback()
2520 size = minsize; in sysmalloc_mmap_fallback()
2542 *s = size; in sysmalloc_mmap_fallback()
2717 size = ALIGN_UP (size, GLRO(dl_pagesize)); in sysmalloc()
2725 if (size > 0) in sysmalloc()
4442 if (__glibc_unlikely (size < MINSIZE || !aligned_OK (size))) in _int_free()
4617 size += nextsize; in _int_free()
4768 size += prevsize; in malloc_consolidate()
[all …]
A Dobstack.c121 # define CALL_CHUNKFUN(h, size) \ argument
123 ? (*(h)->chunkfun)((h)->extra_arg, (size)) \
124 : (*(struct _obstack_chunk *(*)(long))(h)->chunkfun)((size)))
145 int size, int alignment, in _obstack_begin() argument
153 if (size == 0) in _obstack_begin()
167 size = 4096 - extra; in _obstack_begin()
172 h->chunk_size = size; in _obstack_begin()
191 _obstack_begin_1 (struct obstack *h, int size, int alignment, in _obstack_begin_1() argument
200 if (size == 0) in _obstack_begin_1()
214 size = 4096 - extra; in _obstack_begin_1()
[all …]
A Dalloc_buffer_create_failure.c23 __libc_alloc_buffer_create_failure (void *start, size_t size) in __libc_alloc_buffer_create_failure() argument
28 size); in __libc_alloc_buffer_create_failure()
A Dtst-obstack.c13 verbose_malloc (size_t size) in verbose_malloc() argument
15 void *buf = malloc (size); in verbose_malloc()
16 printf ("malloc (%zu) => %p\n", size, buf); in verbose_malloc()
A Ddynarray.h138 bool __libc_dynarray_resize (struct dynarray_header *, size_t size,
143 bool __libc_dynarray_resize_clear (struct dynarray_header *, size_t size,
168 _Noreturn void __libc_dynarray_at_failure (size_t size, size_t index);
A Ddynarray_at_failure.c23 __libc_dynarray_at_failure (size_t size, size_t index) in __libc_dynarray_at_failure() argument
29 index, size); in __libc_dynarray_at_failure()
A Ddynarray-skeleton.c241 DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) in DYNARRAY_NAME() argument
252 if (__glibc_unlikely (index >= DYNARRAY_NAME (size) (list))) in DYNARRAY_NAME()
377 DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) in DYNARRAY_NAME()
379 if (size > list->u.dynarray_header.used) in DYNARRAY_NAME()
386 size, DYNARRAY_SCRATCH (list), in DYNARRAY_NAME()
389 for (size_t i = old_size; i < size; ++i) in DYNARRAY_NAME()
397 (&list->u.dynarray_abstract, size, in DYNARRAY_NAME()
401 size, DYNARRAY_SCRATCH (list), in DYNARRAY_NAME()
412 (list->u.dynarray_header.array + size, in DYNARRAY_NAME()
413 list->u.dynarray_header.used - size); in DYNARRAY_NAME()
[all …]
A Dtst-compathooks-off.c68 calloc_called (size_t n, size_t size, const void *address) in calloc_called() argument
72 void *mem = calloc (n, size); in calloc_called()
78 memalign_called (size_t align, size_t size, const void *address) in memalign_called() argument
82 void *mem = memalign (align, size); in memalign_called()
A Dmemusage.sh169 -x | --x | --x- | --x-s | --x-si | --x-siz | --x-size)
176 --x=* | --x-=* | --x-s=* | --x-si=* | --x-siz=* | --x-size=*)
179 -y | --y | --y- | --y-s | --y-si | --y-siz | --y-size)
186 --y=* | --y-=* | --y-s=* | --y-si=* | --y-siz=* | --y-size=*)
A Dtst-interpose-aux.c146 malloc_internal (size_t size) in malloc_internal() argument
153 size_t allocation_size = size + sizeof (struct allocation_header); in malloc_internal()
154 if (allocation_size < size) in malloc_internal()
225 malloc (size_t size) in malloc() argument
228 void *result = malloc_internal (size); in malloc()
A Dmalloc-check.c55 size_t size; in malloc_check_get_size() local
60 for (size = CHUNK_HDR_SZ + memsize (p) - 1; in malloc_check_get_size()
61 (c = *SAFE_CHAR_OFFSET (p, size)) != magic; in malloc_check_get_size()
62 size -= c) in malloc_check_get_size()
64 if (c <= 0 || size < (c + CHUNK_HDR_SZ)) in malloc_check_get_size()
69 return size - CHUNK_HDR_SZ; in malloc_check_get_size()

Completed in 47 milliseconds

12