-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime allocators #83
Comments
Given that |
Please do send a PR for this, otherwise we might forget about it before stabilizing |
Would the allocator type in this case be |
|
…Amanieu Make `Allocator` object-safe This allows rust-lang/wg-allocators#83: polymorphic allocators
…Amanieu Make `Allocator` object-safe This allows rust-lang/wg-allocators#83: polymorphic allocators
Since rust-lang/rust#81730 was merged, can this issue be closed? |
How is the scenario where the allocator is, and can only be, determined at runtime supported? Not too advanced in Rust, so I might be missing something obvious.
I am kind of looking for the equivalent to the C++ 17 polymorphic allocators. In this scenario, the allocator can literally be dropped from the template definition, and it's determined at runtime, via the constructor. This is common scenario in systems using different heaps for different allocations. In these cases, the common scenario is to have a single allocator type, with different runtime configs:
The text was updated successfully, but these errors were encountered: