[#BloombergLP-balst-StackTraceTestAllocator-2constructor-08]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balst.adoc[balst]::xref:BloombergLP/balst/StackTraceTestAllocator.adoc[StackTraceTestAllocator]::StackTraceTestAllocator
:relfileprefix: ../../../
:mrdocs:

Create a test allocator&period; Optionally specify `numRecordedFrames`, the number of stack trace frame pointers to be saved for every allocation&period; Specifying a larger value of `numRecordedFrames` means that stack traces, when given, will be more complete, but will also mean that both more CPU time and more memory per allocation will be consumed&period; If `numRecordedFrames` is not specified, a value of `12` will be assumed&period; Optionally specify `basicAllocator`, the allocator from which memory will be provided&period; If `basicAllocator` is 0, the `MallocFreeAllocator` singleton is used&period; Associate `bsl&colon;&colon;cerr` with this object for error diagnostic output, which may be changed by calling the `setOstream` manipulator&period; Set the `demanglingPreferringFlag` attribute to `true`, which may be changed using the `setDemanglingPreferredFlag` manipulator&period; The behavior is undefined if `numRecordedFrames &lt; 2`&period;

== Synopsis

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

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


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