https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80658
--- Comment #9 from Bernd Paysan <bernd at net2o dot de> --- (In reply to Jonathan Wakely from comment #2) > "I dropped in jemalloc and ran the test. CPU usage dropped but otherwise > this had no effect." > > i.e. jemalloc was not proposed as a solution. That's the first attempt, before he discovered that there is another allocator (likely mt_alloc) lurking inside, which he need to disable first (after a coworker had enabled it somewhere in the source code): "It turns out that there is a somewhat convoluted way to disable it globally: set the environment variable "GLIBCPP_FORCE_NEW". After doing this, CPU use increased slightly but memory use stabilized. Recalling jemalloc I now once again tried sticking it under the controller in place of glibc's malloc and both CPU load and memory use dropped to substantially less than either stock configuration. More importantly everything became stable once again." If the "GLIBCPP_FORCE_NEW" is not a typo, we can nail down the version he used to somewhere at least 14 years old (because the environment variable is now called GLIBCXX_FORCE_NEW).