* \internal * \brief Reallocates an aligned block of memory. * \throws std::bad_alloc on allocation failure */
| 186 | * \throws std::bad_alloc on allocation failure |
| 187 | */ |
| 188 | inline 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 *** |
no test coverage detected