Lines Matching refs:head

69 __attribute__((noinline))  static uint8_t *poison_allocated_region(poison_head_t *head, size_t allo…  in poison_allocated_region()  argument
71 uint8_t *data = (uint8_t *)(&head[1]); /* start of data ie 'real' allocated buffer */ in poison_allocated_region()
73 head->alloc_size = alloc_size; in poison_allocated_region()
74 head->head_canary = HEAD_CANARY_PATTERN; in poison_allocated_region()
75 MULTI_HEAP_SET_BLOCK_OWNER(head); in poison_allocated_region()
95 poison_head_t *head = (poison_head_t *)((intptr_t)data - sizeof(poison_head_t)); in verify_allocated_region() local
96 poison_tail_t *tail = (poison_tail_t *)((intptr_t)data + head->alloc_size); in verify_allocated_region()
99 if (head->head_canary != HEAD_CANARY_PATTERN) { in verify_allocated_region()
101 …EAP_STDERR_PRINTF("CORRUPT HEAP: Bad head at %p. Expected 0x%08x got 0x%08x\n", &head->head_canary, in verify_allocated_region()
102 HEAD_CANARY_PATTERN, head->head_canary); in verify_allocated_region()
123 return head; in verify_allocated_region()
220 poison_head_t *head = multi_heap_aligned_alloc_impl_offs(heap, size + POISON_OVERHEAD, in multi_heap_aligned_alloc() local
223 if (head != NULL) { in multi_heap_aligned_alloc()
224 data = poison_allocated_region(head, size); in multi_heap_aligned_alloc()
251 poison_head_t *head = multi_heap_malloc_impl(heap, size + POISON_OVERHEAD); in multi_heap_malloc() local
253 if (head != NULL) { in multi_heap_malloc()
254 data = poison_allocated_region(head, size); in multi_heap_malloc()
275 poison_head_t *head = verify_allocated_region(p, true); in multi_heap_free() local
276 assert(head != NULL); in multi_heap_free()
280 memset(head, FREE_FILL_PATTERN, in multi_heap_free()
281 head->alloc_size + POISON_OVERHEAD); in multi_heap_free()
283 multi_heap_free_impl(heap, head); in multi_heap_free()
295 poison_head_t *head = NULL; in multi_heap_realloc() local
311 head = verify_allocated_region(p, true); in multi_heap_realloc()
312 assert(head != NULL); in multi_heap_realloc()
317 new_head = multi_heap_realloc_impl(heap, head, size + POISON_OVERHEAD); in multi_heap_realloc()
333 size_t orig_alloc_size = head->alloc_size; in multi_heap_realloc()
350 char *head = multi_heap_get_block_address_impl(block); in multi_heap_get_block_address() local
351 return head + sizeof(poison_head_t); in multi_heap_get_block_address()
383 poison_head_t *head = verify_allocated_region(p, true); in multi_heap_get_allocated_size() local
384 assert(head != NULL); in multi_heap_get_allocated_size()
385 size_t result = multi_heap_get_allocated_size_impl(heap, head); in multi_heap_get_allocated_size()
429 poison_head_t *head = verify_allocated_region(data, print_errors); in multi_heap_internal_check_block_poisoning() local
430 if (head != NULL && head->alloc_size > size - POISON_OVERHEAD) { in multi_heap_internal_check_block_poisoning()
434 …TI_HEAP_STDERR_PRINTF("CORRUPT HEAP: Size at %p expected <=0x%08x got 0x%08x\n", &head->alloc_size, in multi_heap_internal_check_block_poisoning()
435 size - POISON_OVERHEAD, head->alloc_size); in multi_heap_internal_check_block_poisoning()
439 return head != NULL; in multi_heap_internal_check_block_poisoning()