libstdc++: shrink-to-fit in std::basic_stacktrace::current(skip, max)
authorJonathan Wakely <jwakely@redhat.com>
Tue, 12 Apr 2022 16:17:20 +0000 (17:17 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 12 Apr 2022 21:38:31 +0000 (22:38 +0100)
commitb2c007b87dcd5db5d59447de2081777aea66f35f
tree285fac827988c1854b25808b40f2dfea0c5429a0
parent7cf88759957a7006e1e1d0a82a1a4de3c4db109e
libstdc++: shrink-to-fit in std::basic_stacktrace::current(skip, max)

If a large stacktrace is reduced to a max depth that is less than half
the capacity it will now be reallocated to remove the unused capacity.

libstdc++-v3/ChangeLog:

* include/std/stacktrace (basic_stacktrace::current): Reallocate
a smaller container if the unused capacity is larger than the
used size.
libstdc++-v3/include/std/stacktrace