Fix aligned_realloc to call check_that_malloc_is_allowed() if ptr == 0
Reference issue
What does this implement/fix?
The macros EIGEN_RUNTIME_NO_MALLOC and EIGEN_NO_MALLOC help developers detect dynamic memory allocations requested by Eigen by triggering as assertion. It is possible to circumvent this behavior by declaring an empty object and subsequently resizing. For example: VectorXd x; x.conservativeResize(100); conservativeResize() internally calls std::realloc(ptr,new_size), which is equivalent to std::malloc(new_size) if ptr == 0. This is fixed by defering to aligned_malloc if ptr == 0.