8#ifndef INCLUDED_BALST_STACKTRACETESTALLOCATOR
9#define INCLUDED_BALST_STACKTRACETESTALLOCATOR
508#include <balscm_version.h>
519#include <bsl_cstddef.h>
520#include <bsl_functional.h>
521#include <bsl_iosfwd.h>
562 enum AllocatorMagic { k_STACK_TRACE_TEST_ALLOCATOR_MAGIC = 1335775331 };
569 AllocatorMagic d_magic;
583 BlockHeader *d_blocks;
596 const int d_maxRecordedFrames;
603 const int d_traceBufferLength;
611 bsl::ostream *d_ostream;
632 int checkBlockHeader(
const BlockHeader *blockHdr)
const;
773 return d_failureHandler;
779 return d_numBlocksInUse;
785 return d_numAllocations;
Definition balst_stacktracetestallocator.h:550
const FailureHandler & failureHandler() const
Definition balst_stacktracetestallocator.h:771
void setFailureHandler(const FailureHandler &func)
bsl::size_t numBlocksInUse() const
Return the number of blocks currently allocated from this object.
Definition balst_stacktracetestallocator.h:777
bsl::function< void()> FailureHandler
Definition balst_stacktracetestallocator.h:554
StackTraceTestAllocator(bslma::Allocator *basicAllocator=0)
void * allocate(size_type size) BSLS_KEYWORD_OVERRIDE
void setOstream(bsl::ostream *ostream)
void setAllocationLimit(bsls::Types::Int64 limit)
void setName(const char *name)
~StackTraceTestAllocator() BSLS_KEYWORD_OVERRIDE
void deallocate(void *address) BSLS_KEYWORD_OVERRIDE
bsls::Types::Int64 allocationLimit() const
bsls::Types::Int64 numAllocations() const
Definition balst_stacktracetestallocator.h:783
StackTraceTestAllocator(int numRecordedFrames, bslma::Allocator *basicAllocator=0)
void release() BSLS_KEYWORD_OVERRIDE
Deallocate all memory held by this allocator.
void setDemanglingPreferredFlag(bool value)
void reportBlocksInUse(bsl::ostream *ostream=0) const
Definition bdlma_managedallocator.h:391
Forward declaration.
Definition bslstl_function.h:934
Definition bslma_allocator.h:457
std::size_t size_type
Definition bslma_allocator.h:499
Definition bslmt_mutex.h:315
Definition bsls_atomic.h:892
Definition bsls_atomic.h:743
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_OVERRIDE
Definition bsls_keyword.h:653
Definition balst_objectfileformat.h:161
Definition bdlb_printmethods.h:283
Definition bdlt_iso8601util.h:691
long long Int64
Definition bsls_types.h:132