Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix aligned_malloc for mingw platform #1904

Merged
merged 1 commit into from
Jun 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion common/include/pcl/pcl_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ log2f (float x)
#define MALLOC_ALIGNED 1
#endif

#if defined (HAVE_MM_MALLOC)
#include <mm_malloc.h>
#endif

inline void*
aligned_malloc (size_t size)
{
Expand Down Expand Up @@ -405,7 +409,7 @@ aligned_free (void* ptr)
#if defined (MALLOC_ALIGNED) || defined (HAVE_POSIX_MEMALIGN)
std::free (ptr);
#elif defined (HAVE_MM_MALLOC)
ptr = _mm_free (ptr);
_mm_free (ptr);
#elif defined (_MSC_VER)
_aligned_free (ptr);
#elif defined (ANDROID)
Expand Down