[#BloombergLP-bslma-Allocator-throwBadAlloc] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/Allocator.adoc[Allocator]::throwBadAlloc :relfileprefix: ../../../ :mrdocs: Throw `std::bad_alloc` or abort the program. == Synopsis Declared in `<bslma_allocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void throwBadAlloc(); ---- == Description Throw `std::bad_alloc` if exceptions are enabled or abort the program otherwise. Derived classes and helper functions will typically call this function when they are unable to satisfy an allocation request. This function never returns. DEPRECATED: Use `bsls::BslExceptionUtil::throwBadAlloc` instead. [.small]#Created with https://www.mrdocs.com[MrDocs]#