diff options
author | Joseph Eagar <joeedh@gmail.com> | 2021-04-27 19:01:32 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2021-04-27 19:01:32 +0300 |
commit | 9fab16f0f3ab1fbd49de885cdcb4680b49bdefa2 (patch) | |
tree | 70022dd309ca104404da0bc477e57d2e1607f938 /source/blender/blenlib/BLI_mempool.h | |
parent | 82f5e0200c55453e33d992f6c84e5e11a4de889c (diff) |
* Fix null ptr bug in automasking code
Diffstat (limited to 'source/blender/blenlib/BLI_mempool.h')
-rw-r--r-- | source/blender/blenlib/BLI_mempool.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h index 3ee6f182593..65f60071771 100644 --- a/source/blender/blenlib/BLI_mempool.h +++ b/source/blender/blenlib/BLI_mempool.h @@ -93,6 +93,19 @@ BLI_mempool_iter *BLI_mempool_iter_threadsafe_create(BLI_mempool *pool, ATTR_NONNULL(); void BLI_mempool_iter_threadsafe_free(BLI_mempool_iter *iter_arr) ATTR_NONNULL(); + +/* +This preallocates a mempool suitable for threading. totelem elements are preallocated +in chunks of size pchunk, and returned in r_chunks. +*/ + +BLI_mempool *BLI_mempool_create_for_tasks(const unsigned int esize, + unsigned int totelem, + const unsigned int pchunk, + void ***r_chunks, + unsigned int *r_totchunk, + unsigned int flag); + #ifdef __cplusplus } #endif |