Lines Matching refs:size

33    uint64_t size;
47 uint64_t start, uint64_t size)
50 util_vma_heap_free(heap, start, size);
70 assert(hole->size > 0);
76 assert(hole->size + hole->offset == 0 ||
77 hole->size + hole->offset > hole->offset);
81 * hole->size + hole->offset == prev_offset, then we failed to join
84 assert(hole->size + hole->offset > hole->offset &&
85 hole->size + hole->offset < prev_offset);
96 uint64_t offset, uint64_t size)
99 assert(hole->size >= offset - hole->offset + size);
101 if (offset == hole->offset && size == hole->size) {
108 assert(offset - hole->offset <= hole->size - size);
109 uint64_t waste = (hole->size - size) - (offset - hole->offset);
112 hole->size -= size;
118 hole->offset += size;
119 hole->size -= size;
127 high_hole->offset = offset + size;
128 high_hole->size = waste;
133 hole->size = offset - hole->offset;
143 uint64_t size, uint64_t alignment)
145 /* The caller is expected to reject zero-size allocations */
146 assert(size > 0);
153 if (size > hole->size)
157 * given size can be without going over the top of the hole.
160 * hole->size + hole->offset can only overflow to 0 and size > 0.
162 uint64_t offset = (hole->size - size) + hole->offset;
172 util_vma_hole_alloc(hole, offset, size);
178 if (size > hole->size)
187 if (pad > hole->size - size)
193 util_vma_hole_alloc(hole, offset, size);
205 uint64_t offset, uint64_t size)
212 /* Allocating something with a size of 0 is also not valid. */
213 assert(size > 0);
215 /* It's possible for offset + size to wrap around if we touch the top of
218 assert(offset + size == 0 || offset + size > offset);
230 if (hole->size < offset - hole->offset + size)
233 util_vma_hole_alloc(hole, offset, size);
243 uint64_t offset, uint64_t size)
250 /* Freeing something with a size of 0 is also not valid. */
251 assert(size > 0);
253 /* It's possible for offset + size to wrap around if we touch the top of
256 assert(offset + size == 0 || offset + size > offset);
271 assert(offset + size <= high_hole->offset);
272 bool high_adjacent = high_hole && offset + size == high_hole->offset;
275 assert(low_hole->offset + low_hole->size > low_hole->offset);
276 assert(low_hole->offset + low_hole->size <= offset);
278 bool low_adjacent = low_hole && low_hole->offset + low_hole->size == offset;
282 low_hole->size += size + high_hole->size;
287 low_hole->size += size;
291 high_hole->size += size;
297 hole->size = size;
318 "size = %"PRIu64" (0x%"PRIx64")\n",
319 tab, hole->offset, hole->offset, hole->size, hole->size);
320 total_free += hole->size;