[PATCH] Implement std::pmr::unsynchronized_pool_resource

Jonathan Wakely jwakely@redhat.com
Wed Nov 7 19:12:00 GMT 2018


On 07/11/18 19:55 +0100, Rainer Orth wrote:
>Hi Jonathan,
>
>> 	Implement std::pmr::unsynchronized_pool_resource
>> 	* config/abi/pre/gnu.ver: Add new symbols.
>> 	* include/std/memory_resource (std::pmr::__pool_resource): New class.
>> 	(std::pmr::unsynchronized_pool_resource): New class.
>> 	* src/c++17/Makefile.am: Add -fimplicit-templates to flags for
>> 	memory_resource.cc
>> 	* src/c++17/Makefile.in: Regenerate.
>> 	* src/c++17/memory_resource.cc (bitset, chunk, big_block): New
>> 	internal classes.
>> 	(__pool_resource::_Pool): Define new class.
>> 	(munge_options, pool_index, select_num_pools): New internal functions.
>> 	(__pool_resource::__pool_resource, __pool_resource::~__pool_resource)
>> 	(__pool_resource::allocate, __pool_resource::deallocate)
>> 	(__pool_resource::_M_alloc_pools): Define member functions.
>> 	(unsynchronized_pool_resource::unsynchronized_pool_resource)
>> 	(unsynchronized_pool_resource::~unsynchronized_pool_resource)
>> 	(unsynchronized_pool_resource::release)
>> 	(unsynchronized_pool_resource::_M_find_pool)
>> 	(unsynchronized_pool_resource::do_allocate)
>> 	(unsynchronized_pool_resource::do_deallocate): Define member
>> 	functions.
>> 	* testsuite/20_util/unsynchronized_pool_resource/allocate.cc: New
>> 	test.
>> 	* testsuite/20_util/unsynchronized_pool_resource/is_equal.cc: New
>> 	test.
>> 	* testsuite/20_util/unsynchronized_pool_resource/options.cc: New
>> 	test.
>> 	* testsuite/20_util/unsynchronized_pool_resource/release.cc: New
>> 	test.
>>
>> The new tests being added here are pretty minimal, because we can't
>> assume machines running the testsuite will be able to allocate large
>> amounts of memory. I've tested it more thoroughly with much larger
>> tests though, and will try to get some of them in shape for the
>> testsuite/performance/20_util directory.
>>
>> Tested powerpc64le-linux. Committed to trunk.
>
>two of the new tests FAIL on 32-bit targets (seen on
>i386-pc-solaris2.11, but there are other reports as well):
>
>+FAIL: 20_util/unsynchronized_pool_resource/allocate.cc (test for excess errors)
>+UNRESOLVED: 20_util/unsynchronized_pool_resource/allocate.cc compilation failed to produce executable
>
>Excess errors:
>Undefined                       first referenced
> symbol                             in file
>std::pmr::unsynchronized_pool_resource::do_deallocate(void*, unsigned int, unsigned int) /var/tmp//ccUR6CSd.o
>std::pmr::unsynchronized_pool_resource::do_allocate(unsigned int, unsigned int) /var/tmp//ccUR6CSd.o
>ld: fatal: symbol referencing errors
>
>+FAIL: 20_util/unsynchronized_pool_resource/release.cc (test for excess errors)
>+UNRESOLVED: 20_util/unsynchronized_pool_resource/release.cc compilation failed to produce executable
>
>Excess errors:
>Undefined                       first referenced
> symbol                             in file
>std::pmr::unsynchronized_pool_resource::do_allocate(unsigned int, unsigned int) /var/tmp//ccrQoKEb.o
>ld: fatal: symbol referencing errors

Sorry about that, should be fixed by this patch. Committed to trunk.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1020 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20181107/3add2bbb/attachment.bin>


More information about the Libstdc++ mailing list