-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.1, 10.2, 10.3, 10.4
-
Component/s: Storage Engine - InnoDB
-
Labels:None
inline void* aligned_malloc(size_t size, size_t align) { |
void *result; |
#ifdef _MSC_VER
|
result = _aligned_malloc(size, align);
|
#elif defined (HAVE_POSIX_MEMALIGN)
|
if(posix_memalign(&result, align, size)) { |
result = 0;
|
}
|
#else
|
/* Use unaligned malloc as fallback */ |
result = malloc(size); |
#endif
|
return result; |
}
|
This function should always return aligned buffer, as it's name states.