Skip to content

Fix order of _aligned_malloc arguments for MSVC. - #867

Merged
chriskohlhoff merged 1 commit into
chriskohlhoff:masterfrom
FarisElghlan:fix-msvc-_aligned_malloc
Jul 11, 2021
Merged

Fix order of _aligned_malloc arguments for MSVC.#867
chriskohlhoff merged 1 commit into
chriskohlhoff:masterfrom
FarisElghlan:fix-msvc-_aligned_malloc

Conversation

@FarisElghlan

Copy link
Copy Markdown
Contributor

For MSVC, the arguments of the function _aligned_malloc should be ordered as follows:

void * _aligned_malloc(
    size_t size,
    size_t alignment
);

See: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/aligned-malloc?view=msvc-160

This is different than for std::aligned_alloc and boost::alignment::aligned_alloc.

This fixes the issue reported in #861

@chriskohlhoff
chriskohlhoff merged commit 5fe4758 into chriskohlhoff:master Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants