gcc/libstdc++-v3/testsuite
Jonathan Wakely f2e005857e Improve handling of pool_options::largest_required_pool_block
Make the munge_options function round the largest_required_pool_block
value to a multiple of the smallest pool size (currently 8 bytes) to
avoid pools with odd sizes.

Ensure there is a pool large enough for blocks of the requested size.
Previously when largest_required_pool_block was exactly equal to one of
the pool_sizes[] values there would be no pool of that size. This patch
increases _M_npools by one, so there is a pool at least as large as the
requested value. It also reduces the size of the largest pool to be no
larger than needed.

	* src/c++17/memory_resource.cc (munge_options): Round up value of
	largest_required_pool_block to multiple of smallest pool size. Round
	excessively large values down to largest pool size.
	(select_num_pools): Increase number of pools by one unless it exactly
	matches requested largest_required_pool_block.
	(__pool_resource::_M_alloc_pools()): Make largest pool size equal
	largest_required_pool_block.
	* testsuite/20_util/unsynchronized_pool_resource/options.cc: Check
	that pool_options::largest_required_pool_block is set appropriately.

From-SVN: r266089
2018-11-13 22:57:53 +00:00
..
17_intro C++: simplify output from suggest_alternatives_for 2018-10-29 23:53:50 +00:00
18_support * testsuite/18_support/new_nothrow.cc: XFAIL on AIX. 2018-08-21 10:03:16 -04:00
19_diagnostics Add workaround for non-unique errno values on AIX 2018-08-03 13:53:34 +01:00
20_util Improve handling of pool_options::largest_required_pool_block 2018-11-13 22:57:53 +00:00
21_strings PR libstdc++/87749 fix (and optimize) string move construction 2018-10-25 16:34:04 +01:00
22_locale Adjust test to pass with latest glibc 2018-10-15 14:55:42 +01:00
23_containers PR libstdc++/87809 avoid invalid expressions in exception specifications 2018-10-30 14:49:43 +00:00
24_iterators PR libstdc++/86734 make reverse_iterator::operator-> more robust 2018-07-30 18:13:05 +01:00
25_algorithms 10.cc: Add dg-require-fileio. 2018-08-31 15:09:47 -04:00
26_numerics PR libstdc++/87641 correctly initialize accumulator in valarray::sum() 2018-10-18 16:38:50 +01:00
27_io 48101_neg.cc: Remove dg-prune-output 'std' from regex pattern for versioned namespace... 2018-10-28 20:57:04 +00:00
28_regex Fix compilation error with _GLIBCXX_PARALLEL 2018-10-19 14:46:24 +01:00
29_atomics Add missing dg-require-cstdint directives to tests 2018-07-26 15:03:28 +01:00
30_threads PR libstdc++/80538 Only call sleep for non-zero values 2018-10-11 17:37:23 +01:00
abi Update copyright years. 2018-01-03 11:03:58 +01:00
backward Remove duplicate function call in test 2018-05-02 17:27:01 +01:00
config Update copyright years. 2018-01-03 11:03:58 +01:00
data
decimal Update copyright years. 2018-01-03 11:03:58 +01:00
experimental Rename namespace alias in test to avoid name collision 2018-10-16 17:13:00 +01:00
ext Fix tests that use allocators with incorrect value types 2018-10-19 22:49:40 +01:00
lib Introduce dg-add-options net_ts 2018-10-16 12:27:52 +00:00
libstdc++-abi Update copyright years. 2018-01-03 11:03:58 +01:00
libstdc++-dg Update copyright years. 2018-01-03 11:03:58 +01:00
libstdc++-prettyprinters printers.py (NodeIteratorPrinter): New. 2018-03-08 06:26:15 +00:00
libstdc++-xmethods Update copyright years. 2018-01-03 11:03:58 +01:00
performance Update copyright years. 2018-01-03 11:03:58 +01:00
special_functions PR libstdc++/83140 - assoc_legendre returns negated value when m is odd 2018-05-10 13:59:52 +00:00
tr1 Add missing dg-require-cstdint directives to tests 2018-07-26 15:03:28 +01:00
tr2 PR libstdc++/87784 fix dynamic_bitset::push_back 2018-10-30 14:49:32 +00:00
util testsuite_containers.h (forward_members_unordered<>::forward_members_unordered (const value_type&)): Add local_iterator pre and post increment checks. 2018-10-20 20:00:45 +00:00
Makefile.am Update copyright years. 2018-01-03 11:03:58 +01:00
Makefile.in Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00