• Home
  • Raw
  • Download

Lines Matching refs:offset

32    uint64_t offset;  member
69 assert(hole->offset > 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()
87 prev_offset = hole->offset; in util_vma_heap_validate()
96 uint64_t offset, uint64_t size) in util_vma_hole_alloc() argument
98 assert(hole->offset <= offset); in util_vma_hole_alloc()
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()
116 if (offset == hole->offset) { in util_vma_hole_alloc()
118 hole->offset += size; in util_vma_hole_alloc()
127 high_hole->offset = offset + size; in util_vma_hole_alloc()
133 hole->size = offset - hole->offset; in util_vma_hole_alloc()
162 uint64_t offset = (hole->size - size) + hole->offset; in util_vma_heap_alloc() local
167 offset = (offset / alignment) * alignment; in util_vma_heap_alloc()
169 if (offset < hole->offset) in util_vma_heap_alloc()
172 util_vma_hole_alloc(hole, offset, size); in util_vma_heap_alloc()
174 return offset; in util_vma_heap_alloc()
181 uint64_t offset = hole->offset; in util_vma_heap_alloc() local
184 uint64_t misalign = offset % alignment; in util_vma_heap_alloc()
190 offset += pad; in util_vma_heap_alloc()
193 util_vma_hole_alloc(hole, offset, size); in util_vma_heap_alloc()
195 return offset; in util_vma_heap_alloc()
205 uint64_t offset, uint64_t size) in util_vma_heap_alloc_addr() argument
210 assert(offset > 0); in util_vma_heap_alloc_addr()
218 assert(offset + size == 0 || offset + size > offset); in util_vma_heap_alloc_addr()
222 if (hole->offset > offset) in util_vma_heap_alloc_addr()
229 assert(hole->offset <= 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
248 assert(offset > 0); in util_vma_heap_free()
256 assert(offset + size == 0 || offset + size > offset); in util_vma_heap_free()
263 if (hole->offset <= 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()
290 high_hole->offset = offset; in util_vma_heap_free()
296 hole->offset = offset; in util_vma_heap_free()
319 tab, hole->offset, hole->offset, hole->size, hole->size); in util_vma_heap_print()