QtAlignedMalloc
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // This Source Code Form is subject to the terms of the Mozilla
5 // Public License v. 2.0. If a copy of the MPL was not distributed
6 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 
8 #ifndef EIGEN_QTMALLOC_MODULE_H
9 #define EIGEN_QTMALLOC_MODULE_H
10 
11 #include "Core"
12 
13 #if (!EIGEN_MALLOC_ALREADY_ALIGNED)
14 
16 
17 void *qMalloc(std::size_t size)
18 {
20 }
21 
22 void qFree(void *ptr)
23 {
25 }
26 
27 void *qRealloc(void *ptr, std::size_t size)
28 {
29  void* newPtr = Eigen::internal::aligned_malloc(size);
30  std::memcpy(newPtr, ptr, size);
32  return newPtr;
33 }
34 
36 
37 #endif
38 
39 #endif // EIGEN_QTMALLOC_MODULE_H
void qFree(void *ptr)
Definition: QtAlignedMalloc:22
void * qRealloc(void *ptr, std::size_t size)
Definition: QtAlignedMalloc:27
void * qMalloc(std::size_t size)
Definition: QtAlignedMalloc:17
void * aligned_malloc(std::size_t size)
Definition: Memory.h:207
void aligned_free(void *ptr)
Definition: Memory.h:232