diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h index ee4158af923380df3d6500ef634155985976a785..e142802e6c5eb5eed2ba74cf40b0423f50fda85a 100644 --- a/intern/guardedalloc/MEM_guardedalloc.h +++ b/intern/guardedalloc/MEM_guardedalloc.h @@ -339,7 +339,7 @@ template<typename T> inline T *MEM_cnew(const char *allocation_name, const T &ot public: \ void *operator new(size_t num_bytes) \ { \ - return MEM_mallocN(num_bytes, _id); \ + return MEM_mallocN_aligned(num_bytes, __STDCPP_DEFAULT_NEW_ALIGNMENT__, _id); \ } \ void *operator new(size_t num_bytes, std::align_val_t alignment) \ { \ @@ -353,7 +353,7 @@ template<typename T> inline T *MEM_cnew(const char *allocation_name, const T &ot } \ void *operator new[](size_t num_bytes) \ { \ - return MEM_mallocN(num_bytes, _id "[]"); \ + return MEM_mallocN_aligned(num_bytes, __STDCPP_DEFAULT_NEW_ALIGNMENT__, _id "[]"); \ } \ void *operator new[](size_t num_bytes, std::align_val_t alignment) \ { \