|
memory
|
The exception class thrown when an allocation size is bigger than the supported maximum.
This size is either the node, array or alignment parameter in a call to an allocation function. If those exceed the supported maximum returned by max_node_size(), max_array_size() or max_alignment(), one of its derived classes will be thrown or this class if in a situation where the type is unknown. It is derived from std::bad_alloc. Throwing can be prohibited by the handler function.
catch for bad_allocation_size, not the derived classes. true. Typedefs | |
| using | handler |
| The type of the handler called in the constructor of bad_allocation_size. | |
Static Functions | |
| static handler | set_handler (handler h) |
| static handler | get_handler () |
Member Functions | |
| bad_allocation_size (const allocator_info &info, std::size_t passed, std::size_t supported) | |
| const char * | what () const noexcept override |
| const allocator_info & | allocator () const noexcept |
| std::size_t | passed_value () const noexcept |
| std::size_t | supported_value () const noexcept |
| using handler |
The type of the handler called in the constructor of bad_allocation_size.
When a bad allocation size is detected and the exception object created, this handler gets called. It is especially useful if exception support is disabled. It gets the allocator_info, the size passed to the function and the supported size (the latter is still an upper bound).
std::bad_alloc or abort the program. If it returns, this exception object will be created and thrown. stderr and continues execution, leading to this exception being thrown. On a freestanding implementation it does nothing. | bad_allocation_size | ( | const allocator_info & | info, |
| std::size_t | passed, | ||
| std::size_t | supported ) |
|
overridenoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
1.13.2