Create a StackTraceTestAllocator that records the specified numRecordedFrames of stack trace per allocation.

Synopsis

Declared in <balst_stacktracetestallocator.h>

explicit
StackTraceTestAllocator(
    int numRecordedFrames,
    bslma::Allocator* basicAllocator = 0);

Description

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.

Parameters

Name

Description

numRecordedFrames

number of stack‐trace frames saved per allocation

basicAllocator

memory allocator; null uses MallocFreeAllocator

Created with MrDocs