Skip to content

Alignment not respected on the heap #13094

Closed
@cgaebel

Description

@cgaebel

We have a cool intrinsic called pref_align_of. We don't respect this when allocating memory. This means things like heap-allocated SIMD will be impossible to construct without some pretty crazy hackery.

Ideally, all calls to malloc should be replaced with calls to posix_memalign. This would exploit the undocumented "feature" of glibc that memory returned by posix_memalign can be realloc'd with the same alignment (but an assert and/or unit test for this should definitely be added).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-lowLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions