blender/intern/cycles/device
Sergey Sharybin c8d2bc7890 Cycles: Always use guarded allocator of vectors
We don't have vectors re-allocation happening multiple times from inside
a loop anymore, so we can safely switch to a memory guarded allocator for
vectors and keep track on the memory usage at various stages of rendering.

Additionally, when building from inside Blender repository, Cycles will
use Blender's guarded allocator, so actual memory usage will be displayed
in the Space Info header.

There are couple of tricky aspects of the patch:

- TaskScheduler::exit() now explicitly frees memory used by `threads`.
  This is needed because `threads` is a static member which destructor
  isn't getting called on Blender's exit which caused memory leak print
  to happen.

  This shouldn't give any measurable speed issues, reallocation of that
  vector is only one of fewzillion other allocations happening during
  synchronization.

- Use regular guarded malloc (not aligned one). No idea why it was
  made to be aligned in the first place. Perhaps some corner case tests
  or so. Vector was never expected to be aligned anyway. Let's see if
  we'll have actual bugs with this.

Reviewers: dingto, lukasstockner97, juicyfruit, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1774
2016-02-12 15:43:26 +01:00
..
CMakeLists.txt Cleanup: style 2016-01-24 12:13:37 +11:00
device_cpu.cpp Cycles: Re-implement some utilities to avoid use of boost 2016-02-06 19:19:20 +01:00
device_cuda.cpp Cycles: Make Blender importer more forward compatible 2016-02-12 15:27:33 +01:00
device_intern.h Cycles: Repot CPU and CUDA capabilities to system info operator 2015-01-06 14:13:21 +05:00
device_memory.h Cycles: Gracefully handle out-of-memory happening in device vector 2015-10-11 19:41:59 +05:00
device_multi.cpp Cycles: Optionally output luminance from the shader evaluation kernel 2015-12-30 19:04:04 +05:00
device_network.cpp Cycles: Fix typo in network device 2016-02-11 13:05:55 +01:00
device_network.h Cycles: Optionally output luminance from the shader evaluation kernel 2015-12-30 19:04:04 +05:00
device_opencl.cpp Cycles: Cleanup, indentation and braces 2016-02-03 15:00:55 +01:00
device_task.cpp Cycles-Bake: Custom Baking passes 2016-01-15 13:00:56 -02:00
device_task.h Cycles-Bake: Custom Baking passes 2016-01-15 13:00:56 -02:00
device.cpp Cycles: Always use guarded allocator of vectors 2016-02-12 15:43:26 +01:00
device.h Cycles: Always use guarded allocator of vectors 2016-02-12 15:43:26 +01:00