diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-15 07:37:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-15 07:37:26 +0300 |
commit | 5cd1aaf0808f2bac11fadcf8c351429de54ac68a (patch) | |
tree | 9b1baef650cf03d6729e6080958b44d17579a425 /source/blender/blenlib/BLI_memarena.h | |
parent | 4be166b6b582a428abff90b87005d404f45c9ca0 (diff) |
BLI_memarena: support merging memory arenas
Useful when thread-local storage has it's own memory arena containing
data which is kept after the multi-threaded operation has finished.
Diffstat (limited to 'source/blender/blenlib/BLI_memarena.h')
-rw-r--r-- | source/blender/blenlib/BLI_memarena.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_memarena.h b/source/blender/blenlib/BLI_memarena.h index d7798f12fcc..b2e05b00735 100644 --- a/source/blender/blenlib/BLI_memarena.h +++ b/source/blender/blenlib/BLI_memarena.h @@ -50,6 +50,8 @@ void *BLI_memarena_alloc(struct MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESU void *BLI_memarena_calloc(struct MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2); +void BLI_memarena_merge(MemArena *ma_dst, MemArena *ma_src) ATTR_NONNULL(1, 2); + void BLI_memarena_clear(MemArena *ma) ATTR_NONNULL(1); #ifdef __cplusplus |