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:
authorJulian Eisel <julian@blender.org>2022-02-04 18:40:55 +0300
committerJulian Eisel <julian@blender.org>2022-02-04 18:57:46 +0300
commit4aeb6add6e88ad551ae47e0b8d7cb7fefef30cdb (patch)
tree4c44f6b55002657ae86df45eafd10debddcb7f5a /source/blender/functions
parent150f42e6d3a1f48c7c9eecabc7b63936c221b352 (diff)
Guarded allocator: Document non-obvious initialization with MEM_new()
Initialization with `MEM_new()` depends a lot on the initialization rules of C++, which are not obvious. Calling it with no arguments to be passed to the constructor may cause the resulting object to be implicitly 0 initialized (or parts of it). This can have an impact on performance sensitive code, so it's something to document. Alternatively we could enforce default initialization (as opposed to the value initalization that happens now), but this could cause uninitialized memory in a way that isn't obvious either. This is a possible source of bugs, so Jacques and I decided against it.
Diffstat (limited to 'source/blender/functions')
0 files changed, 0 insertions, 0 deletions