folly::deallocateOverAligned

Free storage for n values obtained from allocateOverAligned.

Synopsis

Declared in <folly/Memory.h>

template<
    typename Alloc,
    size_t kAlign = alignof(typename std::allocator_traits<Alloc>::value_type)>
void
deallocateOverAligned(
    Alloc const& alloc,
    std::allocator_traits<Alloc>::pointer ptr,
    size_t n);

Parameters

NameDescription
allocThe allocator to free the storage through.
ptrThe pointer returned by allocateOverAligned.
nThe number of values the storage was allocated for.