[#BloombergLP-bslma-Allocator-throwBadAlloc]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/Allocator.adoc[Allocator]::throwBadAlloc
:relfileprefix: ../../../
:mrdocs:

Throw `std&colon;&colon;bad&lowbar;alloc` or abort the program&period;

== Synopsis

Declared in `&lt;bslma&lowbar;allocator&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
throwBadAlloc();
----

== Description

Throw `std&colon;&colon;bad&lowbar;alloc` if exceptions are enabled or abort the program otherwise&period; Derived classes and helper functions will typically call this function when they are unable to satisfy an allocation request&period; This function never returns&period;

DEPRECATED&colon; Use `bsls&colon;&colon;BslExceptionUtil&colon;&colon;throwBadAlloc` instead&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
