blender/intern/cycles/render
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
..
attribute.cpp Cycles: Code cleanup, spaces around keywords 2015-03-28 00:15:15 +05:00
attribute.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
background.cpp Cycles: Support per-render layer world AO settings 2015-11-24 13:21:40 +05:00
background.h Cycles: Support per-render layer world AO settings 2015-11-24 13:21:40 +05:00
bake.cpp Fix T46550: Cycles combined baking black in some cases. 2016-02-06 21:02:02 +01:00
bake.h Fix T46550: Cycles combined baking black in some cases. 2016-02-06 21:02:02 +01:00
buffers.cpp Cycles: Add debug pass showing average number of ray bounces per pixel 2015-06-11 14:53:15 +02:00
buffers.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
camera.cpp Cycles: Implement rolling shutter effect 2015-12-31 20:44:27 +05:00
camera.h Cycles: Make Blender importer more forward compatible 2016-02-12 15:27:33 +01:00
CMakeLists.txt Cycles: Use curve approximation for blackbody instead of lookup table 2015-05-05 06:11:54 +00:00
curves.cpp Cycles: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
curves.h Cycles: Make Blender importer more forward compatible 2016-02-12 15:27:33 +01:00
film.cpp Cycles: Add Blackman-Harris filter, fix Gaussian filter 2015-11-18 20:50:06 +01:00
film.h Cycles: Make Blender importer more forward compatible 2016-02-12 15:27:33 +01:00
graph.cpp Cycles: Cleanup, indentation and braces 2016-02-03 15:00:55 +01:00
graph.h Cycles: Fix memory leak in shader graph when bump graph is used 2016-01-05 21:18:02 +05:00
image.cpp Cycles: Cleanup, indentation and braces 2016-02-03 15:00:55 +01:00
image.h Cycles: Increase number of textures allowed for OpenCL render 2015-10-11 18:22:01 +05:00
integrator.cpp Cycles: Fix filter glossy being broken after recent changes 2015-11-20 18:18:27 +05:00
integrator.h Cycles: Make Blender importer more forward compatible 2016-02-12 15:27:33 +01:00
light.cpp Cycles: Fix access uninitialized light after recent refactor/fixes 2016-02-07 06:20:06 +05:00
light.h Cycles: Refactor the way how we exclude light from the device 2016-02-07 02:21:38 +05:00
mesh_displace.cpp Fix T47180: Cycles deform motion blur + displacement behaves weirdly 2016-01-16 15:36:42 +05:00
mesh.cpp Code cleanup: remove unused Cycles code from BVH cache. 2016-02-06 11:55:35 +01:00
mesh.h Cycles: Make Blender importer more forward compatible 2016-02-12 15:27:33 +01:00
nodes.cpp Cycles: Remove some ifdefs for OSL < 1.7.1. 2016-02-11 13:58:50 +01:00
nodes.h Cycles: Add Saw option to the wave texture 2016-01-01 23:25:37 +01:00
object.cpp Fix T45390: Cycles experimental displacement method ignores scaling when render 2015-07-13 15:24:56 +02:00
object.h Fix T44908: Blender crashes when trying to use cycles experimental displacement 2015-06-02 00:04:30 +05:00
osl.cpp Cleanup: Remove support for OSL versions < 1.6. 2016-02-06 00:07:20 +01:00
osl.h Cycles: Update some types used form OSL 2016-01-07 13:15:30 +05:00
particles.cpp Cycles: Add some statistics logging 2015-04-10 15:37:49 +05:00
particles.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
scene.cpp Cycles: Always use guarded allocator of vectors 2016-02-12 15:43:26 +01:00
scene.h Cycles: Make Blender importer more forward compatible 2016-02-12 15:27:33 +01:00
session.cpp Cycles: Make branched path tracer covered with requested features 2015-11-22 13:54:51 +05:00
session.h Cycles: Add utility function to count maximum number of closures used by session 2015-05-09 19:17:49 +05:00
shader.cpp Cycles: Always use guarded allocator of vectors 2016-02-12 15:43:26 +01:00
shader.h Cycles: Always use guarded allocator of vectors 2016-02-12 15:43:26 +01:00
sky_model_data.h Cycles: Code cleanyp, sky model 2015-03-28 00:28:37 +05:00
sky_model.cpp Cycles: Cleanup, indentation and braces 2016-02-03 15:00:55 +01:00
sky_model.h Cycles: Code cleanyp, sky model 2015-03-28 00:28:37 +05:00
sobol.cpp Fix #29528: crash adding subsurf modifier in a particular scene with viewport render. 2011-12-08 21:55:35 +00:00
sobol.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
svm.cpp Cycles: Auto disable World MIS, if we only use a simple color. 2016-02-05 22:13:51 +01:00
svm.h Cycles: Experiment with use of runtime tag instead of set for SVM generation 2015-12-31 15:58:18 +05:00
tables.cpp Cycles: Add some statistics logging 2015-04-10 15:37:49 +05:00
tables.h Cleanup: Fix Cycles Apache header. 2014-12-25 02:50:24 +01:00
tile.cpp Cycles: Adding Hilbert Spiral as a tile order for rendering 2016-01-10 00:13:53 +01:00
tile.h Cycles: Adding Hilbert Spiral as a tile order for rendering 2016-01-10 00:13:53 +01:00