From the docs:
Effects: Allocates memory suitable for an array of type T and size size and constructs an array of objects in it via the placement new expression
new(pointer) T()
ornew(pointer) T(args...)
. allocate_shared uses a copy of allocator to allocate memory. If an exception is thrown, has no effect.
This is performing value initialization of the array, as it value initializes each of the elements one at a time.
Boost also provides a make_shared_noinit
version of the make_shared
function for arrays, which perform no initializations of the array. That might better suit your needs.