https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88264
Bug ID: 88264 Summary: Support glibc-style tunables for <memory_resource> Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- "Tunables are a feature in the GNU C Library that allows application authors and distribution maintainers to alter the runtime library behavior to match their workload." https://www.gnu.org/software/libc/manual/html_node/Tunables.html We should support them in libstdc++ too. The resource types in <memory_resource> are obvious candidates, but there might be others too (default std::async launch policy?). Possible tunables: For monotonic_buffer_resource: the initial buffer size and growth factor. For the pool resources: the supported pool sizes, if/when empty chunks are released to the upstream resource, the default max_blocks_per_chunk and default largest_required_pool_block, initial number of blocks per chunk (in _M_alloc_pools). For the pool resources it would also be possible to tune some of those numbers per-resource by inventing an __extended_pool_options type that goes beyond the two params that std::pmr::pool_options controls.