gcc/libstdc++-v3/include
Jonathan Wakely 2d6c8eea1d PR libstdc++/70940 optimize pmr::resource_adaptor for allocators using malloc
pmr::resource_adaptor can avoid allocating an oversized buffer and doing
manual alignment within that buffer when the wrapped allocator is known
to always meet the requested alignment. Specifically, if the allocator
is known to use malloc or new directly, then we can call the allocator
directly for any fundamental alignment.

	PR libstdc++/70940
	* include/experimental/memory_resource
	(__resource_adaptor_common::_AlignMgr::_M_unadjust): Add assertion.
	(__resource_adaptor_common::__guaranteed_alignment): New helper to
	give maximum alignment an allocator guarantees. Specialize for known
	allocators using new and malloc.
	(__resource_adaptor_imp::do_allocate): Use __guaranteed_alignment.
	(__resource_adaptor_imp::do_deallocate): Likewise.
	* testsuite/experimental/memory_resource/new_delete_resource.cc:
	Check that new and delete are called with expected sizes.

From-SVN: r262935
2018-07-23 20:40:28 +01:00
..
backward P0935R0 Eradicating unnecessarily explicit default constructors 2018-06-14 15:12:24 +01:00
bits PR libstdc++/86595 add missing noexcept 2018-07-20 12:52:54 +01:00
c
c_compatibility
c_global
c_std
debug functions.h (__gnu_debug::__check_string): Move... 2018-07-06 17:02:33 +00:00
decimal
experimental PR libstdc++/70940 optimize pmr::resource_adaptor for allocators using malloc 2018-07-23 20:40:28 +01:00
ext LWG 3035. std::allocator's constructors should be constexpr 2018-06-18 16:47:07 +01:00
parallel
precompiled P0556R3 Integral power-of-2 operations, P0553R2 Bit operations 2018-07-03 22:04:45 +01:00
profile
std PR libstdc++/86603 Move __cpp_lib_list_remove_return_type macro 2018-07-20 12:24:38 +01:00
tr1
tr2
Makefile.am P0556R3 Integral power-of-2 operations, P0553R2 Bit operations 2018-07-03 22:04:45 +01:00
Makefile.in PR libstdc++/86450 use -Wabi=2 and simplify -Werror use 2018-07-17 14:18:47 +01:00