Namespaces
Variants
Views
Actions

std::allocator::max_size

From cppreference.com
< cpp‎ | memory‎ | allocator
 
 
Dynamic memory management
Uninitialized storage
(C++17)
(deprecated since c++17)
(deprecated since c++17)
(deprecated since c++17)
Garbage collection support
Miscellaneous
(C++11)
(C++11)
C Library
Low level memory management
 
 
size_type max_size() const;
(deprecated since C++17)

Returns the maximum theoretically possible value of n, for which the call allocate(n, 0) could succeed.

In most implementations, this returns std::numeric_limits<size_type>::max() / sizeof(value_type).

Contents

[edit] Parameters

(none)

[edit] Return value

The maximum supported allocation size

[edit] Exceptions

(none) (until C++11)
noexcept specification:  
noexcept
  
(since C++11)

[edit] See also

[static]
returns the maximum object size supported by the allocator
(public static member function of std::allocator_traits) [edit]