Skip to content

Missing function: aligned_alloc #3689

Closed
@RalfJung

Description

@RalfJung

This function is part of the C standard. I don't know the full set of targets that support it.

  • Linux: glibc has it, and I found it in musl, too (but that uses malloc + offset -- no idea how they're making sure that you can free the resulting pointer)
  • FreeBSD also seems to have it
  • macOS: available since 10.15 according to this (but buggy until today... but that's not libc's concern)
  • Solaris seems to have it, and same for Illumos (again, buggy...)
  • The function is mentioned here so I assume (recent enough) Android also has it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions