diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-20 20:56:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-20 20:56:46 +0400 |
commit | 65edd07edf270999cc5a59bf4bc732fd1ff56119 (patch) | |
tree | 48c2a8153cd608a1227694acd2c596d2899e21c7 /source/blender/blenlib/BLI_memarena.h | |
parent | b1a0dc6630008286ce957501cd52e29fb57199c6 (diff) |
add BLI_memarena_clear function to reset a memarena, keeping the last allocated block for more efficient reuse.
Diffstat (limited to 'source/blender/blenlib/BLI_memarena.h')
-rw-r--r-- | source/blender/blenlib/BLI_memarena.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_memarena.h b/source/blender/blenlib/BLI_memarena.h index d54dab42e05..fbcacf515b5 100644 --- a/source/blender/blenlib/BLI_memarena.h +++ b/source/blender/blenlib/BLI_memarena.h @@ -93,10 +93,14 @@ __attribute__((alloc_size(2))) #endif ; -#ifdef __cplusplus -} +void BLI_memarena_clear(MemArena *ma) +#if MEM_GNU_ATTRIBUTES +__attribute__((nonnull(1))) #endif +; - +#ifdef __cplusplus +} #endif +#endif /* __BLI_MEMARENA_H__ */ |