21 minutes ago, Gnollrunner said:I believe he should be able to do a custom allocator. I think nobody really uses standard new and delete for this kind of stuff. It's really rare that I do. Slab allocation is almost instantaneous after initial start up. You can easy make it use inlined free-list push and pops, especially if you aren't worried about threading. Even if you are, there are some cheats that you can do depending on the usage.
Also in my experience the fragmentation issue is often overstated. In many applications you have a lot of smallish objects, and yes they may get created and deleted often. However with size specific heaps, or as I like to use, a heap with a hash table of size specific free-lists, the holes get filled before the heap grows.
The main issues I've found with std::shared_ptr and std::weak_ptr is the double sized pointers and the fact that you can't easy pass around raw pointers and then assign them to shared_ptr or week_ptr on the fly since you'll end up with multiple control blocks. However this is kind of a design thing, so for his API it might be fine as long as he's consistent with using smart pointers.
Why do I need a custom allocator? What for? I don't really get the fragmentation thing.