[Bug libstdc++/96942] std::pmr::monotonic_buffer_resource causes CPU cache misses

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 8 11:50:44 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96942

--- Comment #17 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #16)
> To request a power of two size from the upstream resource, so that we don't
> e.g. ask for 4090 bytes and waste the end of a page.

Or even worse, allocate (n*4096+11) and get n+1 pages from malloc, and waste
4085 bytes from the last page.


More information about the Gcc-bugs mailing list