[#BloombergLP-bslma-TestAllocator-setAllocationLimit] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/TestAllocator.adoc[TestAllocator]::setAllocationLimit :relfileprefix: ../../../ :mrdocs: Set the allocation limit before an exception is thrown to `limit`. == Synopsis Declared in `<bslma_testallocator.h>` [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`. If `limit` is less than 0, no exception is to be thrown. By default, no exception is scheduled. == Parameters [cols="1,4"] |=== | Name| Description | *limit* | Number of valid allocations before an exception is thrown. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#