SysTutorials

Linux Manual Pages › Section 3

stdallocator_traitsmax_size(3)

std::allocator_traits<Alloc>::max_size - std::allocator_traits<Alloc>::max_size

Synopsis

Defined in header <memory> static size_type max_size( const Alloc& a ) noexcept; (since C++11) If possible, obtains the maximum theoretically possible allocation size from the allocator a, by calling a.max_size() If the above is not possible (e.g. a does not have the member function max_size()), then returns std::numeric_limits<size_type>::max() (until C++17) std::numeric_limits<size_type>::max() / sizeof(value_type) (since C++17)

Parameters

(none)

Return value

Theoretical maximum allocation size

See also

max_size returns the largest supported allocation size                       (public member function of std::allocator<T>) (deprecated in C++17) (removed in C++20)