This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/64535] Emergency buffer for exception allocation too small


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]