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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-07-03 13:21:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-07-03 13:30:20 +0300
commit468adfa4fd9fab09f2ceeca40ab3c72e071931c6 (patch)
treeaae2b4f05a18c4f84cdf748f7b0d380cb082764e /intern
parentcdea648117064c38864a2aabc3fafdc0460b1ef4 (diff)
Guarded allocator: Override placement new operator
Allows to in-place construct objects which are using guarded allocator.
Diffstat (limited to 'intern')
-rw-r--r--intern/guardedalloc/MEM_guardedalloc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h
index bbba69edf1d..55ea1d0bb70 100644
--- a/intern/guardedalloc/MEM_guardedalloc.h
+++ b/intern/guardedalloc/MEM_guardedalloc.h
@@ -239,6 +239,10 @@ void MEM_use_guarded_allocator(void);
{ \
if (mem) \
MEM_freeN(mem); \
+ } \
+ void *operator new(size_t /*count*/, void *ptr) \
+ { \
+ return ptr; \
}
/* Needed when type includes a namespace, then the namespace should not be