MCPcopy Create free account
hub / github.com/PX4/eigen / aligned_realloc

Function aligned_realloc

Eigen/src/Core/util/Memory.h:188–203  ·  view source on GitHub ↗

* \internal * \brief Reallocates an aligned block of memory. * \throws std::bad_alloc on allocation failure */

Source from the content-addressed store, hash-verified

186 * \throws std::bad_alloc on allocation failure
187 */
188inline void* aligned_realloc(void *ptr, std::size_t new_size, std::size_t old_size)
189{
190 EIGEN_UNUSED_VARIABLE(old_size);
191
192 void *result;
193#if (EIGEN_DEFAULT_ALIGN_BYTES==0) || EIGEN_MALLOC_ALREADY_ALIGNED
194 result = std::realloc(ptr,new_size);
195#else
196 result = handmade_aligned_realloc(ptr,new_size,old_size);
197#endif
198
199 if (!result && new_size)
200 throw_std_bad_alloc();
201
202 return result;
203}
204
205/*****************************************************************************
206*** Implementation of conditionally aligned functions ***

Callers 1

Calls 2

handmade_aligned_reallocFunction · 0.85
throw_std_bad_allocFunction · 0.85

Tested by

no test coverage detected