[Bug libstdc++/65434] Memory leak in pool constructor

meisenmann.lba@fh-salzburg.ac.at gcc-bugzilla@gcc.gnu.org
Tue Dec 13 09:00:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65434

--- Comment #7 from Markus Eisenmann <meisenmann.lba@fh-salzburg.ac.at> ---
Hi!

My motivation to use/implement this patch (comment #6) is to prevent using
malloc to allocate the needed emergency-buffer region, if the needed overall
size is bellow a (configurable) limit; e.g., embedded targets without
threading-support.

It does not change the behaviour of the sub-allocator (pool), but will allow to
apply/use a static memory-region (from BSS), which will solve this kind of
memory-leak (if the second - I.e, static - memory-provider template will
choosen).

Best regards from Salzburg,
Markus


More information about the Gcc-bugs mailing list