projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
275691e
)
util/vma: Allow initializing zero-size heaps
author
Faith Ekstrand
<faith.ekstrand@collabora.com>
Tue, 31 Jan 2023 02:12:00 +0000
(20:12 -0600)
committer
Marge Bot
<emma+marge@anholt.net>
Fri, 4 Aug 2023 21:32:00 +0000
(21:32 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
src/util/vma.c
patch
|
blob
|
history
diff --git
a/src/util/vma.c
b/src/util/vma.c
index
3775825
..
ca96486
100644
(file)
--- a/
src/util/vma.c
+++ b/
src/util/vma.c
@@
-49,7
+49,8
@@
util_vma_heap_init(struct util_vma_heap *heap,
{
list_inithead(&heap->holes);
heap->free_size = 0;
- util_vma_heap_free(heap, start, size);
+ if (size > 0)
+ util_vma_heap_free(heap, start, size);
/* Default to using high addresses */
heap->alloc_high = true;