Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-05-20 01:59:41 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-05-20 02:03:05 +0300
commit183ba284f213903f2208349fe1dd57c07c327ad9 (patch)
tree28690e868340794bd18b5a40d56ca24d7f304cfd /source/blender/blenlib/intern/task_range.cc
parent120e9924c177c7a8fde06b9c5eca98e4e2a19180 (diff)
Cleanup: make guarded memory allocation always thread safe
Previously this would be enabled when threads were used, but threads are now basically always in use so there is no point. Further, this is only needed for guarded allocation with --debug-memory which is not performance critical.
Diffstat (limited to 'source/blender/blenlib/intern/task_range.cc')
-rw-r--r--source/blender/blenlib/intern/task_range.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/task_range.cc b/source/blender/blenlib/intern/task_range.cc
index da38c8fd352..67d8960434e 100644
--- a/source/blender/blenlib/intern/task_range.cc
+++ b/source/blender/blenlib/intern/task_range.cc
@@ -115,8 +115,6 @@ void BLI_task_parallel_range(const int start,
#ifdef WITH_TBB
/* Multithreading. */
if (settings->use_threading && BLI_task_scheduler_num_threads() > 1) {
- BLI_threaded_malloc_begin();
-
RangeTask task(func, userdata, settings);
const size_t grainsize = MAX2(settings->min_iter_per_thread, 1);
const tbb::blocked_range<int> range(start, stop, grainsize);
@@ -130,8 +128,6 @@ void BLI_task_parallel_range(const int start,
else {
parallel_for(range, task);
}
-
- BLI_threaded_malloc_end();
return;
}
#endif