r263354 - in /trunk/libstdc++-v3: ChangeLog con...

redi@gcc.gnu.org redi@gcc.gnu.org
Tue Aug 7 11:31:00 GMT 2018


Author: redi
Date: Tue Aug  7 11:31:16 2018
New Revision: 263354

URL: https://gcc.gnu.org/viewcvs?rev=263354&root=gcc&view=rev
Log:
Define monotonic_buffer_resource members out-of-line

Move the allocation logic into libstdc++.so so that it can be changed
without worrying about inlined code in existing binaries.

Leave do_allocate inline so that calls to it can be devirtualized, and
only the slow path needs to call into the library.

	* config/abi/pre/gnu.ver: Export monotonic_buffer_resource members.
	* include/std/memory_resource (monotonic_buffer_resource::release):
	Call _M_release_buffers to free buffers.
	(monotonic_buffer_resource::do_allocate): Call _M_new_buffer to
	allocate a new buffer from upstream.
	(monotonic_buffer_resource::_M_new_buffer): Declare.
	(monotonic_buffer_resource::_M_release_buffers): Declare.
	(monotonic_buffer_resource::_Chunk): Replace definition with
	declaration as opaque type.
	* src/c++17/memory_resource.cc (monotonic_buffer_resource::_Chunk):
	Define.
	(monotonic_buffer_resource::_M_new_buffer): Define.
	(monotonic_buffer_resource::_M_release_buffers): Define.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/config/abi/pre/gnu.ver
    trunk/libstdc++-v3/include/std/memory_resource
    trunk/libstdc++-v3/src/c++17/memory_resource.cc



More information about the Libstdc++-cvs mailing list