Lines Matching refs:size_t
65 size_t size;
75 size_t size;
76 size_t remaining;
88 static ssize_t heap_grow(size_t len, free_t **bucket);
127 size_t size, size_t *rounded_up_out, int adjust, int increment) { in size_to_index_helper()
130 if (sizeof(size_t) == 8u && size <= sizeof(free_t) - sizeof(header_t)) { in size_to_index_helper()
152 unsigned row = sizeof(size_t) * 8 - 4 - __builtin_clzl(size); in size_to_index_helper()
168 static int size_to_index_allocating(size_t size, size_t *rounded_up_out) { in size_to_index_allocating()
169 size_t rounded = ROUNDUP(size, 8); in size_to_index_allocating()
174 static int size_to_index_freeing(size_t size) { in size_to_index_freeing()
175 size_t dummy; in size_to_index_freeing()
219 static void create_free_area(void *address, void *left, size_t size, free_t **bucket) { in create_free_area()
243 static void free_to_os(header_t *header, size_t size) { in free_to_os()
249 static void free_memory(void *address, void *left, size_t size) { in free_memory()
278 void *address, size_t offset, size_t size, void *left) { in create_allocation_header()
299 size_t remaining = theheap.remaining; in TestTrimHelper()
323 size_t test_sizes[200]; in cmpct_test_trim()
326 for (size_t s = 1; s < PAGE_SIZE * 4; s = (s + 1) * 1.1) { in cmpct_test_trim()
338 size_t s = test_sizes[i]; in cmpct_test_trim()
353 size_t remaining = theheap.remaining; in cmpct_test_trim()
378 size_t s = test_sizes[i]; in cmpct_test_trim()
391 size_t remaining = theheap.remaining; in cmpct_test_trim()
419 size_t rounded; in cmpct_test_buckets()
470 static void cmpct_test_get_back_newly_freed_helper(size_t size) { in cmpct_test_get_back_newly_freed_helper()
495 size_t increment = 16; in cmpct_test_get_back_newly_freed()
496 for (size_t i = 128; i <= 0x8000000; i *= 2, increment *= 2) { in cmpct_test_get_back_newly_freed()
497 for (size_t j = i; j < i * 2; j += increment) { in cmpct_test_get_back_newly_freed()
503 for (size_t i = 1024; i <= 2048; i++) { in cmpct_test_get_back_newly_freed()
510 size_t remaining = theheap.remaining; in cmpct_test_return_to_os()
586 static void *large_alloc(size_t size) { in large_alloc()
588 size_t requested_size = size; in large_alloc()
633 size_t freed_up = old_os_allocation_end - new_os_allocation_end; in cmpct_trim()
639 size_t new_free_size = free_area->header.size - freed_up; in cmpct_trim()
654 size_t freed_up = new_os_allocation_start - old_os_allocation_start; in cmpct_trim()
659 size_t sentinel_size = sizeof(header_t); in cmpct_trim()
660 size_t new_free_size = free_area->header.size - freed_up; in cmpct_trim()
684 void *cmpct_alloc(size_t size) { in cmpct_alloc()
689 size_t rounded_up; in cmpct_alloc()
698 size_t growby = MIN(1u << HEAP_ALLOC_VIRTUAL_BITS, in cmpct_alloc()
711 size_t left_over = head->header.size - rounded_up; in cmpct_alloc()
737 void *cmpct_memalign(size_t size, size_t alignment) { in cmpct_memalign()
739 size_t padded_size = in cmpct_memalign()
743 size_t mask = alignment - 1; in cmpct_memalign()
750 size_t left_over = payload - unaligned; in cmpct_memalign()
769 size_t size = header->size; in cmpct_free()
802 void *cmpct_realloc(void *payload, size_t size) { in cmpct_realloc()
805 size_t old_size = header->size - sizeof(header_t); in cmpct_realloc()
812 static void add_to_heap(void *new_area, size_t size, free_t **bucket) { in add_to_heap()
818 size_t free_size = size - 2 * sizeof(header_t); in add_to_heap()
827 static ssize_t heap_grow(size_t size, free_t **bucket) { in heap_grow()
854 size_t initial_alloc = HEAP_GROW_SIZE - 2 * sizeof(header_t); in cmpct_init()