Namespaces
Variants
Views
Actions

std::scoped_allocator_adaptor::allocate

From cppreference.com
 
 
 
 
Defined in header <scoped_allocator>
pointer allocate( size_type n );
(1) (since C++11)
pointer allocate( size_type n, const_void_pointer hint );
(2) (since C++11)

1) Uses the outer allocator to allocate uninitialized storage, by calling std::allocator_traits<OuterAlloc>::allocate(outer_allocator(), n)

2) Uses the outer allocator to allocate uninitialized storage with the memory locality hint provided, by calling std::allocator_traits<OuterAlloc>::allocate(outer_allocator(), n, hint)

[edit] Parameters

n - the number of objects to allocate storage for
hint - pointer to a nearby memory location

[edit] Return value

The pointer to the allocated storage

[edit] See also

allocates uninitialized storage
(public member function of std::allocator) [edit]
[static]
allocates uninitialized storage using the allocator
(public static member function of std::allocator_traits) [edit]