diff --git a/src/nvcore/Memory.cpp b/src/nvcore/Memory.cpp index ab8f5d1..ec60bb6 100644 --- a/src/nvcore/Memory.cpp +++ b/src/nvcore/Memory.cpp @@ -131,7 +131,7 @@ void * nv::aligned_malloc(size_t size, size_t alignment) posix_memalign(&ptr, alignment, size); return ptr; #elif NV_OS_LINUX - return memalign(alignment, size) + return memalign(alignment, size); #else // NV_OS_ORBIS || NV_OS_IOS // @@ IC: iOS appears to be 16 byte aligned, should we check alignment and assert if we request a higher alignment factor? return ::malloc(size); diff --git a/src/nvcore/Memory.h b/src/nvcore/Memory.h index 5739e49..0e748c5 100644 --- a/src/nvcore/Memory.h +++ b/src/nvcore/Memory.h @@ -10,6 +10,10 @@ #include // memset //#include // size_t +#if NV_OS_LINUX +#include // memalign() +#endif + //#include // new and delete #define TRACK_MEMORY_LEAKS 0