bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parameterize the memory allocator for the container library


From: Marc Nieper-Wißkirchen
Subject: Re: Parameterize the memory allocator for the container library
Date: Thu, 15 Feb 2024 11:04:37 +0100


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

--


Am Sa., 10. Feb. 2024 um 18:28 Uhr schrieb Bruno Haible <bruno@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]