summaryrefslogtreecommitdiffstats
path: root/src/util/u_memory.h
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-09-12 16:26:38 -0700
committerDylan Baker <[email protected]>2020-04-21 11:09:03 -0700
commitbb560f2d653dd5d080c7f03859936ce50bea5b72 (patch)
treeff08455bd067485b901520f8e1ec84b7c2b41e81 /src/util/u_memory.h
parentb85775900d084e3d27f269c3bd336b9aa356b98d (diff)
util: Add an aligned realloc function
Mesa has one of these in imports.h, so u_memory needs one as well. This is the version from mesa ported. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
Diffstat (limited to 'src/util/u_memory.h')
-rw-r--r--src/util/u_memory.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/u_memory.h b/src/util/u_memory.h
index 15a0bb419b5..4cdccb66aaf 100644
--- a/src/util/u_memory.h
+++ b/src/util/u_memory.h
@@ -60,6 +60,7 @@ extern "C" {
#define align_malloc(_size, _alignment) os_malloc_aligned(_size, _alignment)
#define align_free(_ptr) os_free_aligned(_ptr)
+#define align_realloc(_ptr, _oldsize, _newsize, _alignment) os_realloc_aligned(_ptr, _oldsize, _newsize, _alignment)
static inline void *
align_calloc(size_t size, unsigned long alignment)