]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/container/src/monotonic_buffer_resource.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / container / src / monotonic_buffer_resource.cpp
index 29ffde1db2a32c1f1e8b60a5d685c72935bd6017..c676992aa15721ea2aa9021dbe4d431e7d4518b9 100644 (file)
@@ -141,6 +141,9 @@ void* monotonic_buffer_resource::do_allocate(std::size_t bytes, std::size_t alig
    //See if there is room in current buffer
    std::size_t aligner = 0u;
    if(this->remaining_storage(alignment, aligner) < bytes){
+      //The new buffer will be aligned to the strictest alignment so reset
+      //the aligner, which was needed for the old buffer.
+      aligner = 0u;
       //Update next_buffer_size to at least bytes
       this->increase_next_buffer_at_least_to(bytes);
       //Now allocate and update internal data