Fix T76858: non-thread safe sculpt memory allocation when using --debug-memory
By default the guarded memory allocator is not thread safe, that needs to be initialized.
This commit is contained in:
parent
59cfb20fa1
commit
499c0229f7
Notes:
blender-bot
2023-02-14 10:18:56 +01:00
Referenced by issue #76858, Threading issue in sculpt mode
|
@ -121,6 +121,8 @@ void BKE_pbvh_parallel_range(const int start,
|
|||
#ifdef WITH_TBB
|
||||
/* Multithreading. */
|
||||
if (settings->use_threading) {
|
||||
BLI_threaded_malloc_begin();
|
||||
|
||||
PBVHTask task(func, userdata, settings);
|
||||
|
||||
if (settings->func_reduce) {
|
||||
|
@ -133,6 +135,7 @@ void BKE_pbvh_parallel_range(const int start,
|
|||
parallel_for(tbb::blocked_range<int>(start, stop), task);
|
||||
}
|
||||
|
||||
BLI_threaded_malloc_end();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue