mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-03 17:24:11 +08:00
Fix aligned_realloc to call check_that_malloc_is_allowed() if ptr == 0
This commit is contained in:
parent
4a56359406
commit
a678a3e052
@ -216,6 +216,7 @@ EIGEN_DEVICE_FUNC inline void aligned_free(void *ptr)
|
|||||||
*/
|
*/
|
||||||
inline void* aligned_realloc(void *ptr, std::size_t new_size, std::size_t old_size)
|
inline void* aligned_realloc(void *ptr, std::size_t new_size, std::size_t old_size)
|
||||||
{
|
{
|
||||||
|
if (ptr == 0) return aligned_malloc(new_size);
|
||||||
EIGEN_UNUSED_VARIABLE(old_size)
|
EIGEN_UNUSED_VARIABLE(old_size)
|
||||||
|
|
||||||
void *result;
|
void *result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user