Landing: 14617bda37f8
Project / Subsystem
gcc / libstdc++
Date
2026-05-26
Author
Nathan Myers
Commit
14617bda37f8c7e2da8efa335b47b41332a559eb
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- 14617bda37f8c7e2da8efa335b47b41332a559eb
- source_type
- github
- headline
- Libstdc++ now allocates only what it reports for P0401.
- tldr
- Libstdc++'s allocate_at_least now rounds allocation requests down to the reported size, addressing discrepancies during deallocation.
- author
- Nathan Myers
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • memory allocation
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-26T00:00:00.000Z
The allocate_at_least function in libstdc++ was rounding up allocation requests to the default alignment, potentially allocating more memory than reported. This difference caused issues during deallocation. The patch modifies the allocation algorithm to align request sizes with what’s reported, avoiding over-allocation and fixing a test failure on -m32. It also adds guards for -fno-aligned-new and -fno-sized-deallocation.