align singleton malloc
authorMaksim Shabunin <maksim.shabunin@gmail.com>
Tue, 21 Nov 2017 14:54:57 +0000 (17:54 +0300)
committerMaksim Shabunin <maksim.shabunin@gmail.com>
Tue, 21 Nov 2017 14:55:23 +0000 (17:55 +0300)
modules/core/include/opencv2/core/private.hpp

index eb1b307..232214a 100644 (file)
@@ -162,7 +162,7 @@ CV_EXPORTS void scalarToRawData(const cv::Scalar& s, void* buf, int type, int un
 
 //! Allocate all memory buffers which will not be freed, ease filtering memcheck issues
 template <typename T>
-CV_EXPORTS T* allocSingleton(size_t count) { return new T[count]; }
+CV_EXPORTS T* allocSingleton(size_t count) { return fastMalloc(sizeof(T) * count); }
 }
 
 // property implementation macros