/malloc/ |
A D | malloc.h | 43 extern void *calloc (size_t __nmemb, size_t __size) 51 extern void *realloc (void *__ptr, size_t __size) 59 extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) 67 extern void *memalign (size_t __alignment, size_t __size) 102 size_t ordblks; /* number of free chunks */ 103 size_t smblks; /* number of fastbin blocks */ 104 size_t hblks; /* number of mmapped regions */ 105 size_t hblkhd; /* space in mmapped regions */ 108 size_t uordblks; /* total allocated space */ 109 size_t fordblks; /* total free space */ [all …]
|
A D | dynarray.h | 103 size_t used; 104 size_t allocated; 110 static inline size_t 130 void *scratch, size_t element_size); 138 bool __libc_dynarray_resize (struct dynarray_header *, size_t size, 139 void *scratch, size_t element_size); 143 bool __libc_dynarray_resize_clear (struct dynarray_header *, size_t size, 144 void *scratch, size_t element_size); 150 size_t length; 161 size_t element_size, [all …]
|
A D | alloc_buffer_alloc_array.c | 23 __libc_alloc_buffer_alloc_array (struct alloc_buffer *buf, size_t element_size, in __libc_alloc_buffer_alloc_array() 24 size_t align, size_t count) in __libc_alloc_buffer_alloc_array() 26 size_t current = buf->__alloc_buffer_current; in __libc_alloc_buffer_alloc_array() 28 size_t aligned = ALIGN_UP (current, align); in __libc_alloc_buffer_alloc_array() 29 size_t size; in __libc_alloc_buffer_alloc_array() 31 size_t new_current = aligned + size; in __libc_alloc_buffer_alloc_array()
|
A D | malloc-debug.c | 31 extern void *__libc_memalign (size_t, size_t); 34 extern void *__libc_calloc (size_t, size_t); 88 static void *memalign_hook_ini (size_t, size_t, const void *) __THROW; 145 memalign_hook_ini (size_t alignment, size_t sz, const void *caller) in memalign_hook_ini() 273 void *(*hook) (size_t, size_t, const void *) = in strong_alias() 297 __debug_memalign (size_t alignment, size_t bytes) in __debug_memalign() 356 __debug_calloc (size_t nmemb, size_t size) in strong_alias() 358 size_t bytes; in strong_alias() 399 size_t in strong_alias() 604 size_t *candidate = (size_t *) ms->sbrk_base; in malloc_set_state() [all …]
|
A D | tst-interpose-aux.c | 98 size_t allocation_index; 99 size_t allocation_size; 106 static size_t allocation_index; 107 static size_t deallocation_count; 146 malloc_internal (size_t size) in malloc_internal() 207 size_t 211 size_t count = allocation_index; in malloc_allocation_count() 216 size_t 225 malloc (size_t size) in malloc() 245 calloc (size_t a, size_t b) in calloc() [all …]
|
A D | tst-scratch_buffer.c | 28 unchanged_array_size (struct scratch_buffer *buf, size_t a, size_t b) in unchanged_array_size() 30 size_t old_length = buf->length; in unchanged_array_size() 47 array_size_must_fail (size_t a, size_t b) in array_size_must_fail() 88 size_t old_length = buf.length; in do_test() 103 size_t old_length = buf.length; in do_test() 136 && unchanged_array_size (&buf, (size_t) (1ULL << 32), 0) in do_test() 137 && unchanged_array_size (&buf, 0, (size_t) (1ULL << 32)))) in do_test() 150 && array_size_must_fail (((size_t)-1) / 4, 4) in do_test() 151 && array_size_must_fail (4, ((size_t)-1) / 4))) in do_test() 159 size_t sizes[] = { 16, buf.length, buf.length + 16 }; in do_test() [all …]
|
A D | tst-compathooks-off.c | 29 extern void *(*volatile __malloc_hook)(size_t, const void *); 30 extern void *(*volatile __realloc_hook)(void *, size_t, const void *); 31 extern void *(*volatile __memalign_hook)(size_t, size_t, const void *); 48 malloc_called (size_t bytes, const void *address) in malloc_called() 58 realloc_called (void *oldptr, size_t bytes, const void *address) in realloc_called() 68 calloc_called (size_t n, size_t size, const void *address) in calloc_called() 78 memalign_called (size_t align, size_t size, const void *address) in memalign_called()
|
A D | memusage.c | 44 static void *(*callocp) (size_t, size_t); 50 static void *(*mremapp) (void *, size_t, size_t, int, void *); 69 size_t length; 70 size_t magic; 139 update_data (struct header *result, size_t len, size_t old_len) in update_data() 150 size_t heap in update_data() 244 callocp = (void *(*)(size_t, size_t))dlsym (RTLD_NEXT, "calloc"); in me() 347 malloc (size_t len) in malloc() 401 size_t old_len; in realloc() 492 calloc (size_t n, size_t len) in calloc() [all …]
|
A D | arena.c | 47 static inline size_t 57 static inline size_t 106 static size_t narenas = 1; 155 size_t max_size = heap_max_size (); in heap_for_ptr() 482 alloc_new_heap (size_t size, size_t top_pad, size_t pagesize, in alloc_new_heap() 488 size_t min_size = heap_min_size (); in alloc_new_heap() 562 new_heap (size_t size, size_t top_pad) in new_heap() 585 size_t pagesize = h->pagesize; in grow_heap() 737 _int_new_arena (size_t size) in _int_new_arena() 928 static size_t narenas_limit; in arena_get2() [all …]
|
A D | mcheck-impl.c | 56 static void flood (void *, int, size_t); 58 flood (void *ptr, int val, size_t size) in flood() 190 size_t size = *sizep; in malloc_mcheck_before() 224 memalign_mcheck_before (size_t alignment, size_t *sizep, void **victimp) in memalign_mcheck_before() 227 size_t slop, size = *sizep; in memalign_mcheck_before() 241 if (size > ~((size_t) 0) - (slop + 1)) in memalign_mcheck_before() 253 memalign_mcheck_after (void *block, size_t alignment, size_t size) in memalign_mcheck_after() 275 realloc_mcheck_before (void **ptrp, size_t *sizep, size_t *oldsize, in realloc_mcheck_before() 278 size_t size = *sizep; in realloc_mcheck_before() 307 size_t osize; in realloc_mcheck_before() [all …]
|
A D | scratch_buffer_set_array_size.c | 29 size_t nelem, size_t size) in __libc_scratch_buffer_set_array_size() 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()
|
A D | tst-reallocarray.c | 26 reallocarray_nowarn (void *ptr, size_t nmemb, size_t size) in reallocarray_nowarn() 47 size_t i; in do_test() 49 const size_t max = ~(size_t)0; in do_test() 50 size_t a, b; in do_test() 117 ptr2 = reallocarray_nowarn (ptr, 2, ~(size_t)0); in do_test()
|
A D | mallocbug.c | 6 #define size_t unsigned int macro 18 size_t over_top_size = 0x3000; in main() 20 size_t over_top_dup_size = 0x7000; in main() 22 size_t i; in main()
|
A D | reallocarray.c | 24 __libc_reallocarray (void *optr, size_t nmemb, size_t elem_size) in __libc_reallocarray() 26 size_t bytes; in __libc_reallocarray()
|
A D | dynarray_resize_clear.c | 23 __libc_dynarray_resize_clear (struct dynarray_header *list, size_t size, in __libc_dynarray_resize_clear() 24 void *scratch, size_t element_size) in __libc_dynarray_resize_clear() 26 size_t old_size = list->used; in __libc_dynarray_resize_clear()
|
A D | hooks.c | 36 void *weak_variable (*__malloc_hook) (size_t, const void *) = NULL; 37 void *weak_variable (*__realloc_hook) (void *, size_t, const void *) = NULL; 38 void *weak_variable (*__memalign_hook) (size_t, size_t, const void *) = NULL;
|
A D | tst-malloc-too-large.c | 70 test_large_allocations (size_t size) in test_large_allocations() 100 for (size_t nmemb = 1; nmemb <= 8; nmemb *= 2) in test_large_allocations() 137 test_large_aligned_allocations (size_t size) in test_large_aligned_allocations() 145 size_t align; in test_large_aligned_allocations() 262 for (size_t i = 0; i <= FOURTEEN_ON_BITS; i++) in do_test() 272 for (size_t i = 1; i <= FOURTEEN_ON_BITS; i++) in do_test() 284 for (size_t msbs = FOURTEEN_ON_BITS; msbs >= 1; msbs--) in do_test() 286 size_t size = (msbs << 50) | FIFTY_ON_BITS; in do_test()
|
A D | tst-interpose-aux.h | 25 size_t malloc_allocation_count (void); 28 size_t malloc_deallocation_count (void);
|
A D | dynarray_finalize.c | 25 void *scratch, size_t element_size, in __libc_dynarray_finalize() 32 size_t used = list->used; in __libc_dynarray_finalize() 45 size_t allocation_size = used * element_size; in __libc_dynarray_finalize()
|
A D | dynarray_resize.c | 26 __libc_dynarray_resize (struct dynarray_header *list, size_t size, in __libc_dynarray_resize() 27 void *scratch, size_t element_size) in __libc_dynarray_resize() 40 size_t new_size_bytes; in __libc_dynarray_resize()
|
A D | malloc.c | 633 void* __libc_calloc(size_t, size_t); 677 void* __libc_memalign(size_t, size_t); 794 int __posix_memalign(void **, size_t, size_t); 1112 static void* _int_memalign(mstate, size_t, size_t); 1114 static void* _mid_memalign(size_t, size_t, void *); 3519 __libc_memalign (size_t alignment, size_t bytes) in libc_hidden_def() 3623 __libc_calloc (size_t n, size_t elem_size) in __libc_calloc() 5122 static size_t 5136 size_t 5152 size_t i; in int_mallinfo() [all …]
|
A D | tst-mallocstate.c | 56 / sizeof (size_t)] = {1}; 60 static size_t *next_heap_chunk; 98 dumped_heap_alloc (size_t length) in dumped_heap_alloc() 109 _Static_assert (sizeof (size_t) <= heap_alignment, in dumped_heap_alloc() 114 size_t chunk_size = sizeof (size_t) + length; in dumped_heap_alloc() 133 next_heap_chunk += chunk_size / sizeof (size_t); in dumped_heap_alloc() 156 randomize_buffer (unsigned char *buffer, size_t length, in randomize_buffer() 159 for (size_t i = 0; i < length; ++i) in randomize_buffer() 165 dump_hex (unsigned char *buffer, size_t length) in dump_hex() 187 size_t size = alloc->size; in check_allocation() [all …]
|
A D | tst-dynarray-at-fail.c | 30 check (const char *test, void (*callback) (void *), size_t index, in check() 54 size_t *pindex = closure; in test_empty() 64 size_t *pindex = closure; in test_one() 75 size_t *pindex = closure; in test_many()
|
A D | dynarray_emplace_enlarge.c | 27 void *scratch, size_t element_size) in __libc_dynarray_emplace_enlarge() 29 size_t new_allocated; in __libc_dynarray_emplace_enlarge() 54 size_t new_size; in __libc_dynarray_emplace_enlarge()
|
A D | dynarray_at_failure.c | 23 __libc_dynarray_at_failure (size_t size, size_t index) in __libc_dynarray_at_failure()
|