Lines Matching full:allocator
215 void alloc_destroy(QGuestAllocator *allocator) in alloc_destroy() argument
222 QTAILQ_FOREACH_SAFE(node, allocator->used, MLIST_ENTNAME, tmp) { in alloc_destroy()
223 if (allocator->opts & (ALLOC_LEAK_WARN | ALLOC_LEAK_ASSERT)) { in alloc_destroy()
228 if (allocator->opts & (ALLOC_LEAK_ASSERT)) { in alloc_destroy()
237 QTAILQ_FOREACH_SAFE(node, allocator->free, MLIST_ENTNAME, tmp) { in alloc_destroy()
238 if ((allocator->opts & mask) == mask) { in alloc_destroy()
239 if ((node->addr != allocator->start) || in alloc_destroy()
240 (node->size != allocator->end - allocator->start)) { in alloc_destroy()
249 g_free(allocator->used); in alloc_destroy()
250 g_free(allocator->free); in alloc_destroy()
253 uint64_t guest_alloc(QGuestAllocator *allocator, size_t size) in guest_alloc() argument
262 rsize += (allocator->page_size - 1); in guest_alloc()
263 rsize &= -allocator->page_size; in guest_alloc()
264 g_assert_cmpint((allocator->start + rsize), <=, allocator->end); in guest_alloc()
267 naddr = mlist_alloc(allocator, rsize); in guest_alloc()
268 if (allocator->opts & ALLOC_PARANOID) { in guest_alloc()
269 mlist_check(allocator); in guest_alloc()
275 void guest_free(QGuestAllocator *allocator, uint64_t addr) in guest_free() argument
280 mlist_free(allocator, addr); in guest_free()
281 if (allocator->opts & ALLOC_PARANOID) { in guest_free()
282 mlist_check(allocator); in guest_free()
307 void alloc_set_flags(QGuestAllocator *allocator, QAllocOpts opts) in alloc_set_flags() argument
309 allocator->opts |= opts; in alloc_set_flags()
334 /* Inherit the lists of the source allocator: */ in migrate_allocator()