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

For info: aligned_alloc undefined #33

Open
tomdeakin opened this issue Apr 6, 2017 · 1 comment
Open

For info: aligned_alloc undefined #33

tomdeakin opened this issue Apr 6, 2017 · 1 comment
Labels

Comments

@tomdeakin
Copy link
Contributor

tomdeakin commented Apr 6, 2017

On systems with GLIBC < 2.17 C11 is not available, and so aligned_alloc is not defined. It can be defined using the POSIX equivalent by adding the following to the code:

void* aligned_alloc(size_t alignment, size_t size)
{
    void* mem;
    posix_memalign(&mem, alignment, size);
    return mem;
}
@tomdeakin
Copy link
Contributor Author

Pre 2.17 GLIBC versions are no longer supported by the GLIBC developers. However RHEL 6 currently uses an old version with a long EOL on this distribution. Keeping this issue alive for information only.

@tomdeakin tomdeakin changed the title aligned_alloc undefined For info: aligned_alloc undefined Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant