Lines Matching refs:allocation
128 allocation_t *allocation = (allocation_t *)hash_map_get(allocations, return_ptr); in allocation_tracker_notify_alloc() local
129 if (allocation) { in allocation_tracker_notify_alloc()
130 assert(allocation->freed); // Must have been freed before in allocation_tracker_notify_alloc()
132 allocation = (allocation_t *)calloc(1, sizeof(allocation_t)); in allocation_tracker_notify_alloc()
133 hash_map_set(allocations, return_ptr, allocation); in allocation_tracker_notify_alloc()
136 allocation->allocator_id = allocator_id; in allocation_tracker_notify_alloc()
137 allocation->freed = false; in allocation_tracker_notify_alloc()
138 allocation->size = requested_size; in allocation_tracker_notify_alloc()
139 allocation->ptr = return_ptr; in allocation_tracker_notify_alloc()
156 allocation_t *allocation = (allocation_t *)hash_map_get(allocations, ptr); in allocation_tracker_notify_free() local
157 assert(allocation); // Must have been tracked before in allocation_tracker_notify_free()
158 assert(!allocation->freed); // Must not be a double free in allocation_tracker_notify_free()
159 assert(allocation->allocator_id == allocator_id); // Must be from the same allocator in allocation_tracker_notify_free()
160 allocation->freed = true; in allocation_tracker_notify_free()
163 UNUSED_ATTR const char *end_canary = ((char *)ptr) + allocation->size; in allocation_tracker_notify_free()
185 allocation_t *allocation = (allocation_t *)entry->data; in allocation_entry_freed_checker() local
186 if (!allocation->freed) { in allocation_entry_freed_checker()
187 *((size_t *)context) += allocation->size; // Report back the unfreed byte count in allocation_entry_freed_checker()
188 …location. address: 0x%zx size: %zd bytes", __func__, (uintptr_t)allocation->ptr, allocation->size); in allocation_entry_freed_checker()