[#BloombergLP-bslma-StdTestAllocator-2constructor-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/StdTestAllocator.adoc[StdTestAllocator]::StdTestAllocator
:relfileprefix: ../../../
:mrdocs:

Create a proxy that forwards to the specified `mechanism`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
StdTestAllocator(xref:BloombergLP/bslma/Allocator.adoc[Allocator]* mechanism);
----

== Description

Convert a `bslma&colon;&colon;Allocator` pointer to a test allocator object which forwards allocation calls to the object pointed to by the specified `mechanism`&period; The `mechanism` must be a `bslma&colon;&colon;TestAllocator` (or a type derived from it), or 0&period; If `mechanism` is 0, then the currently installed default allocator is used instead&period; Postcondition&colon; `0 &equals;&equals; mechanism &verbar;&verbar; this&hyphen;&gt;mechanism() &equals;&equals; mechanism`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *mechanism*
| The test allocator used as the allocation mechanism&period;
|===


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