News for hackers. Stuff that matters.
Re:Custom Allocators in Rust by conaclos on Saturday April 08, 2023 @01:26PM (#35495545)
What do you mean by Containers?

A good abstraction for passing allocators could be effect and effect handler.

Re:Custom Allocators in Rust by stephc_int13 on Saturday April 08, 2023 @01:38PM (#35495681)
A container is basically a structure holding a collection.

In that case, the container also acts as an allocator (the feature can be embedded directly or not)

The only practical difference is that a container should provide some facilities for traversal, while the allocator is only taking care of allocating and freeing.

From my experience, I very rarely allocate things without keeping them in a kind of container, it can be something as simple as an array of references.