[#BloombergLP-bslma-TestAllocator_ProxyBase-setAllocationLimit]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/TestAllocator_ProxyBase.adoc[TestAllocator&lowbar;ProxyBase]::setAllocationLimit
:relfileprefix: ../../../
:mrdocs:

Set the allocation limit on the proxied test allocator&period;

== Synopsis

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

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

== Description

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *limit*
| The allocation limit to set on the proxied allocator&period;
|===


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