Hi, If I may chime into the discussion, let me remark that local parameterization of the memory allocator is often useful (while the linker approach means a global replacement). For example, part of the program/library may work with an arena allocator (see, e.g. [1] for a general discussion) and containers used in this part of the program should use the arena allocator instead of the global allocator.
The C++ container types have the ability to use custom allocators (see [2] for some simple benchmarks). Best, Marc -- [1] https://www.rfleury.com/p/untangling-lifetimes-the-arena-allocator [2] https://indiegamedev.net/2022/03/27/custom-c20-memory-allocators-for-stl-containers/ Am Sa., 10. Feb. 2024 um 18:28 Uhr schrieb Bruno Haible <br...@clisp.org>: > Hi, > > > Is it possible to parameterize the memory allocator for the ordered map > > library? > > 1) What's the use-case? > > 2) What's wrong with the approach outlined in > https://stackoverflow.com/questions/17803456/ ? > > Bruno > > > > >