|
|
|
|
|
by treyd
74 days ago
|
|
> not only do you need specialised data structures, but all (transitively) allocating calls need to be specialised Most crates for containers will be written such that the container types take an optional allocator type parameter that defaults to the global allocator. You can set it and it transparently uses the other allocator. To improve the ergonomics, you'd define local aliases that use that allocator. type MyVec<T> = Vec<T, A = MyAlloc>;
|
|