Skip to content

make it possible to swap out liballoc without recompiling Rust #18838

Closed
@thestinger

Description

@thestinger

It would be nice if it was possible to use an alternate global allocator without recompiling all of Rust. This would make it painless to swap in a build of jemalloc with assertions enabled which is a very useful debugging tool. It would also mean that the default liballoc could use a build of jemalloc without niche frills like heap profiling and zero/junk filling without forcing a recompile to use them.

If and when jemalloc gains support for sized deallocation in the reallocation APIs (either upstream or in Rust's fork), a sane implementation of the non-standard API could be done via the platform allocator API. This would make it possible to choose between jemalloc and the platform allocator without recompiling Rust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-allocatorsArea: Custom and system allocators

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions