Skip to content

Feature request: Singleton allocators #294

@Pr0methean

Description

@Pr0methean

If each static variable storing an allocator were wrapped in the Default method of a different named ZST, then through an extension trait it would be possible to use methods like Box::from and Iterator::<Vec<_>::collect() with the same syntax as with the global allocator. That would be handy because it'd mean not having to change any code except for defining the ZST, creating/destroying the instance, and adding it to function and type signatures. Could we please have an interface of that kind so that porting away from the global allocator would be easier?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions