-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I propose to explicitly allow to allocate and deallocate with different implementations of Allocator trait under specified circumstances. I'm not sure how exactly it must be done, but I guess it would not increase complexity of Allocator trait while provide some benefits:
- It can help
Vectoo, because on resizeVecis passing old pointer, so allocator might not need to store pointers to original data storage, reducing size ofVec<T, A>. - Resolve Split
Allocatortrait #112, because bumpalo can just allocate inBox<T, Bump>and then convert toBox<T, Noop>. - Kind of allow
&move T, because it's semantics are quite similar toBox<T, Noop>. - Increase flexibility.
Maybe conversion can be allowed only via impl From<Box<T, A1>> for Box<T, A2> where A1: From<A2>, or just allow (declare sound) to Box::from_raw_in(Box::into_raw(box)).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels