[PATCH] D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource.

Eric Fiselier via Phabricator reviews at reviews.llvm.org
Sun Dec 9 18:00:06 PST 2018


EricWF requested changes to this revision.
EricWF added a comment.
This revision now requires changes to proceed.

Some of the tests aren't passing with Trunk clang. Please fix these.



================
Comment at: include/experimental/memory_resource:427
+{
+    static const size_t __default_buffer_capacity = 1024;
+    static const size_t __default_buffer_alignment = 16;
----------------
`constexpr` these constants if they're const?


================
Comment at: test/std/experimental/memory/memory.resource.monotonic.buffer/monotonic.buffer.mem/allocate_overaligned_request.pass.cpp:32
+    void *ret = r1.allocate(2048, big_alignment);
+    assert(ret != nullptr);
+    assert(globalMemCounter.checkNewCalledEq(1));
----------------
This check isn't passing with ToT clang.


================
Comment at: test/std/experimental/memory/memory.resource.monotonic.buffer/monotonic.buffer.mem/allocate_overaligned_request.pass.cpp:43
+    assert(globalMemCounter.checkNewCalledEq(2));
+    // assert(globalMemCounter.last_new_align >= 4);
+    // assert(globalMemCounter.last_new_align < big_alignment);
----------------
Either remove this or uncomment them. Preferably the latter. More test coverage is better.


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D47111/new/

https://reviews.llvm.org/D47111





More information about the libcxx-commits mailing list