util: Remove size from linear_parent creation

None of the callsites took advantage of this, so remove
the feature.  This will help to a next change that will
add an opaque type to represent a linear parent.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25280>
This commit is contained in:
Caio Oliveira
2023-09-17 23:11:58 -07:00
committed by Marge Bot
parent 4519421db5
commit aec516ead6
10 changed files with 18 additions and 44 deletions
+3 -11
View File
@@ -556,7 +556,6 @@ public: \
#define DECLARE_LINEAR_ZALLOC_CXX_OPERATORS(type) \
DECLARE_ALLOC_CXX_OPERATORS_TEMPLATE(type, linear_zalloc_child)
/**
* Do a fast allocation from the linear buffer, also known as the child node
* from the allocator's point of view. It can't be freed directly. You have
@@ -568,25 +567,18 @@ public: \
void *linear_alloc_child(void *parent, unsigned size) MALLOCLIKE;
/**
* Allocate a parent node that will hold linear buffers. The returned
* allocation is actually the first child node, but it's also the handle
* of the parent node. Use it for all child node allocations.
* Allocate a parent node that will hold linear buffers.
* Use it for all child node allocations.
*
* \param ralloc_ctx ralloc context, must not be NULL
* \param size size to allocate (max 32 bits)
*/
void *linear_alloc_parent(void *ralloc_ctx, unsigned size) MALLOCLIKE;
void *linear_alloc_parent(void *ralloc_ctx);
/**
* Same as linear_alloc_child, but also clears memory.
*/
void *linear_zalloc_child(void *parent, unsigned size) MALLOCLIKE;
/**
* Same as linear_alloc_parent, but also clears memory.
*/
void *linear_zalloc_parent(void *ralloc_ctx, unsigned size) MALLOCLIKE;
/**
* Free the linear parent node. This will free all child nodes too.
* Freeing the ralloc parent will also free this.