]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/container/pmr/memory_resource.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / container / pmr / memory_resource.hpp
index 6f4f24ce069356e5d08e9cb5f29325bb439855a9..e99fd0206a1a1c98440c95bf8d2b95f80213fef6 100644 (file)
@@ -19,6 +19,7 @@
 #include <boost/container/detail/workaround.hpp>
 #include <boost/container/container_fwd.hpp>
 #include <boost/move/detail/type_traits.hpp>
+#include <boost/container/detail/placement_new.hpp>
 #include <cstddef>
 
 namespace boost {
@@ -41,7 +42,11 @@ class memory_resource
    //! <b>Effects</b>: Equivalent to
    //! `return do_allocate(bytes, alignment);`
    void* allocate(std::size_t bytes, std::size_t alignment = max_align)
-   {  return this->do_allocate(bytes, alignment);  }
+   {  
+      //Obtain a pointer to enough storage and initialize the lifetime 
+      //of an array object of the given size in the address
+      return ::operator new(bytes, this->do_allocate(bytes, alignment), boost_container_new_t());
+   }
 
    //! <b>Effects</b>: Equivalent to
    //! `return do_deallocate(bytes, alignment);`