]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Disable all emergency EH pool code if obj-count == 0
authorJonathan Wakely <jwakely@redhat.com>
Wed, 12 Oct 2022 22:04:53 +0000 (23:04 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 14 Oct 2022 14:35:41 +0000 (15:35 +0100)
commit0dd9dd1fdfca1219bbe3ac460b50c6776b427119
treed658f3094b09bfea5263f7b42d258232001cf18c
parentcf0b7e9787c3686c47219a725f2cbcaa19faaaca
libstdc++: Disable all emergency EH pool code if obj-count == 0

For a zero-sized static pool we can completely elide all code for the EH
pool.

We no longer need to adjust the static buffer size to ensure at least
one free_entry can be created in it, because we no longer use a static
buffer at all if obj_count == 0. If the buffer exists, obj_count >= 1
and the buffer will be much larger than sizeof(free_entry).

libstdc++-v3/ChangeLog:

* libsupc++/eh_alloc.cc [USE_POOL]: New macro.
[!USE_POOL] (__gnu_cxx::__freeres, pool): Do not define.
[_GLIBCXX_EH_POOL_STATIC] (pool::arena): Do not use std::max.
(__cxxabiv1::__cxa_allocate_exception) [!USE_POOL]: Do not use
pool.
(__cxxabiv1::__cxa_free_exception) [!USE_POOL]: Likewise.
(__cxxabiv1::__cxa_allocate_dependent_exception) [!USE_POOL]:
Likewise.
(__cxxabiv1::__cxa_free_dependent_exception) [!USE_POOL]:
Likewise.
libstdc++-v3/libsupc++/eh_alloc.cc
This page took 0.05771 seconds and 6 git commands to generate.