[#BloombergLP-balst-StackTraceTestAllocator-2constructor-0a] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balst.adoc[balst]::xref:BloombergLP/balst/StackTraceTestAllocator.adoc[StackTraceTestAllocator]::StackTraceTestAllocator :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<balst_stacktracetestallocator.h>` Create a test allocator. Optionally specify `numRecordedFrames`, the number of stack trace frame pointers to be saved for every allocation. 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. If `numRecordedFrames` is not specified, a value of `12` will be assumed. Optionally specify `basicAllocator`, the allocator from which memory will be provided. If `basicAllocator` is 0, the `MallocFreeAllocator` singleton is used. Associate `bsl::cerr` with this object for error diagnostic output, which may be changed by calling the `setOstream` manipulator. Set the `demanglingPreferringFlag` attribute to `true`, which may be changed using the `setDemanglingPreferredFlag` manipulator. The behavior is undefined if `numRecordedFrames < 2`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/balst/StackTraceTestAllocator/2constructor-08.adoc[StackTraceTestAllocator](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balst/StackTraceTestAllocator/2constructor-08.adoc[_» more..._]# Create a `StackTraceTestAllocator` that records the specified `numRecordedFrames` of stack trace per allocation. Optionally specify `basicAllocator`, the allocator from which memory will be provided. If `basicAllocator` is 0, the `MallocFreeAllocator` singleton is used. The behavior is undefined if `numRecordedFrames < 2`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/balst/StackTraceTestAllocator/2constructor-03.adoc[StackTraceTestAllocator]( int numRecordedFrames, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balst/StackTraceTestAllocator/2constructor-03.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#