Skip to content

Expose standard C and POSIX APIs even without override #75

Closed

Description

@gnzlbg

It would be great if the library could always expose a standard C and POSIX API, e.g., for example, right now, mi_aligned_alloc and mi_posix_memalign are missing.

Ideally, they would always be available. This would allow writing a wrapper that uses the standard C names, e.g., aligned_alloc, and just always calls mi_aligned_alloc internally, instead of having some logic to do different things depending on MI_OVERRIDE.

Activity

  1. daanx commented on Jul 4, 2019

    @daanx
    Collaborator

    I agree -- hope to get to it soon

  2. daanx commented on Jul 8, 2019

    @daanx
    Collaborator

    The new commit exposes a whole host of mi_ prefixed posix, unix, and C++ allocation variants.
    We just need a header file now that will automatically redirect malloc to mi_malloc and friends and that should give one more option of overriding malloc in projects. :-)

  3. gnzlbg commented on Jul 8, 2019

    @gnzlbg
    Author

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions