Skip to content

Commit

Permalink
Merge pull request castano#276 from StefanBruens/fix_memalign_linux
Browse files Browse the repository at this point in the history
Fix compilation on Linux - missing include, semicolon
castano authored Feb 7, 2018
2 parents 9489aed + ff3bd55 commit 2c276f6
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/nvcore/Memory.cpp
Original file line number Diff line number Diff line change
@@ -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);
4 changes: 4 additions & 0 deletions src/nvcore/Memory.h
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2c276f6

Please sign in to comment.