[#BloombergLP-balst-StackTraceTestAllocator-setAllocationLimit]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balst.adoc[balst]::xref:BloombergLP/balst/StackTraceTestAllocator.adoc[StackTraceTestAllocator]::setAllocationLimit
:relfileprefix: ../../../
:mrdocs:

Set the allocation&hyphen;limit before an exception is thrown&period;

== Synopsis

Declared in `&lt;balst&lowbar;stacktracetestallocator&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setAllocationLimit(xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] limit);
----

== Description

Set the number of valid allocation requests before an exception is to be thrown for this allocator to the specified `limit`&period; If `limit` is less than 0, no exception is to be thrown&period; By default, no exception is scheduled&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *limit*
| remaining allocations before an exception is thrown
|===


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