Fix compilation on Linux - missing include, semicolon

According to http://man7.org/linux/man-pages/man3/memalign.3.html ,
memalign() is defined in malloc.h.
Also, the line should be terminated with a semicolon.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
pull/276/head
Stefan Brüns 6 years ago
parent 9489aed825
commit ff3bd55892

@ -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);

@ -10,6 +10,10 @@
#include <string.h> // memset
//#include <stddef.h> // size_t
#if NV_OS_LINUX
#include <malloc.h> // memalign()
#endif
//#include <new> // new and delete
#define TRACK_MEMORY_LEAKS 0

Loading…
Cancel
Save