This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/64535] Emergency buffer for exception allocation too small
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Jan 2015 10:18:55 +0000
- Subject: [Bug libstdc++/64535] Emergency buffer for exception allocation too small
- Auto-submitted: auto-generated
- References: <bug-64535-4 at http dot gcc dot gnu dot org/bugzilla/>
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.