https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64535
--- Comment #10 from rguenther at suse dot de <rguenther at suse dot de> --- On Mon, 12 Jan 2015, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64535 > > --- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > If all allocations from the emergency pool are at least > sizeof(__cxa_refcounted_exception) long (or what is the minimum), then trying > to split the memory into smaller chunks (down to sizeof(free_entry)) might be > counter-productive. Maybe, it's not 100% clear to me as the small remains could be merged with a released entry to an even larger one. That said, I tried to make the allocation class generic enough for re-use, but adding a min_free_size const is certainly possible (template parameters for arena size and minimum free list element size). If re-testing finishes successfully I'll give the sorting and merging a stab, shouldn't be too difficult.