In the boost doc of make_shared, it says:
Besides convenience and style, such a function is also exception safe and considerably faster because it can use a single allocation for both the object and its corresponding control block, eliminating a significant portion of shared_ptr's construction overhead.
I don't understand the meaning of "single allocation", what does it mean?
make_shared
: It's alwaysstd::allocator
. By the way, how do they manage thatT*
is still always at the top of the data structure? – Ubiquitarian