• Home
  • Raw
  • Download

Lines Matching refs:size

33    uint64_t size;  member
47 uint64_t start, uint64_t size) in util_vma_heap_init() argument
50 util_vma_heap_free(heap, start, size); in util_vma_heap_init()
70 assert(hole->size > 0); in util_vma_heap_validate()
76 assert(hole->size + hole->offset == 0 || in util_vma_heap_validate()
77 hole->size + hole->offset > hole->offset); in util_vma_heap_validate()
84 assert(hole->size + hole->offset > hole->offset && in util_vma_heap_validate()
85 hole->size + hole->offset < prev_offset); in util_vma_heap_validate()
96 uint64_t offset, uint64_t size) in util_vma_hole_alloc() argument
99 assert(hole->size >= offset - hole->offset + size); in util_vma_hole_alloc()
101 if (offset == hole->offset && size == hole->size) { in util_vma_hole_alloc()
108 assert(offset - hole->offset <= hole->size - size); in util_vma_hole_alloc()
109 uint64_t waste = (hole->size - size) - (offset - hole->offset); in util_vma_hole_alloc()
112 hole->size -= size; in util_vma_hole_alloc()
118 hole->offset += size; in util_vma_hole_alloc()
119 hole->size -= size; in util_vma_hole_alloc()
127 high_hole->offset = offset + size; in util_vma_hole_alloc()
128 high_hole->size = waste; in util_vma_hole_alloc()
133 hole->size = offset - hole->offset; in util_vma_hole_alloc()
143 uint64_t size, uint64_t alignment) in util_vma_heap_alloc() argument
146 assert(size > 0); in util_vma_heap_alloc()
153 if (size > hole->size) in util_vma_heap_alloc()
162 uint64_t offset = (hole->size - size) + hole->offset; in util_vma_heap_alloc()
172 util_vma_hole_alloc(hole, offset, size); in util_vma_heap_alloc()
178 if (size > hole->size) in util_vma_heap_alloc()
187 if (pad > hole->size - size) in util_vma_heap_alloc()
193 util_vma_hole_alloc(hole, offset, size); in util_vma_heap_alloc()
205 uint64_t offset, uint64_t size) in util_vma_heap_alloc_addr() argument
213 assert(size > 0); in util_vma_heap_alloc_addr()
218 assert(offset + size == 0 || offset + size > offset); in util_vma_heap_alloc_addr()
230 if (hole->size < offset - hole->offset + size) in util_vma_heap_alloc_addr()
233 util_vma_hole_alloc(hole, offset, size); in util_vma_heap_alloc_addr()
243 uint64_t offset, uint64_t size) in util_vma_heap_free() argument
251 assert(size > 0); in util_vma_heap_free()
256 assert(offset + size == 0 || offset + size > offset); in util_vma_heap_free()
271 assert(offset + size <= high_hole->offset); in util_vma_heap_free()
272 bool high_adjacent = high_hole && offset + size == high_hole->offset; in util_vma_heap_free()
275 assert(low_hole->offset + low_hole->size > low_hole->offset); in util_vma_heap_free()
276 assert(low_hole->offset + low_hole->size <= offset); in util_vma_heap_free()
278 bool low_adjacent = low_hole && low_hole->offset + low_hole->size == offset; in util_vma_heap_free()
282 low_hole->size += size + high_hole->size; in util_vma_heap_free()
287 low_hole->size += size; in util_vma_heap_free()
291 high_hole->size += size; in util_vma_heap_free()
297 hole->size = size; in util_vma_heap_free()
319 tab, hole->offset, hole->offset, hole->size, hole->size); in util_vma_heap_print()
320 total_free += hole->size; in util_vma_heap_print()