Skip to content

Instantly share code, notes, and snippets.

@dubhater
Created May 24, 2017 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dubhater/af54ea666d88d18568ebe24d615a460e to your computer and use it in GitHub Desktop.
Save dubhater/af54ea666d88d18568ebe24d615a460e to your computer and use it in GitHub Desktop.
--- openexr-2.2.0/IlmImf/ImfSystemSpecific.h 2014-08-10 07:23:57.000000000 +0300
+++ openexr-2.2.0/IlmImf/ImfSystemSpecific.h 2017-05-24 22:28:12.713121986 +0300
@@ -62,15 +62,14 @@
static void* EXRAllocAligned(size_t size, size_t alignment)
{
- void* ptr = 0;
- posix_memalign(&ptr, alignment, size);
+ void* ptr = _aligned_malloc(size, alignment);
return ptr;
}
static void EXRFreeAligned(void* ptr)
{
- free(ptr);
+ _aligned_free(ptr);
}
#elif defined _MSC_VER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment