util/ralloc: add memdup
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27762>
This commit is contained in:
committed by
Marge Bot
parent
d964f57a48
commit
66b00e2966
@@ -313,6 +313,11 @@ void *ralloc_parent(const void *ptr);
|
||||
*/
|
||||
void ralloc_set_destructor(const void *ptr, void(*destructor)(void *));
|
||||
|
||||
/**
|
||||
* Duplicate memory, allocating the memory from the given context.
|
||||
*/
|
||||
void *ralloc_memdup(const void *ctx, const void *mem, size_t n) MALLOCLIKE;
|
||||
|
||||
/// \defgroup array String Functions @{
|
||||
/**
|
||||
* Duplicate a string, allocating the memory from the given context.
|
||||
|
||||
Reference in New Issue
Block a user