8#ifndef INCLUDED_BALL_COUNTINGALLOCATOR
9#define INCLUDED_BALL_COUNTINGALLOCATOR
114#include <balscm_version.h>
208, d_allocator_p(
bslma::Default::allocator(basicAllocator))
220 d_byteCount += totalSize;
221 void *address = d_allocator_p->
allocate(totalSize);
222 *((
int *)address) =
static_cast<int>(totalSize);
231 d_byteCount -= *((
int *)address);
Definition ball_countingallocator.h:138
void * allocate(size_type size) BSLS_KEYWORD_OVERRIDE
Definition ball_countingallocator.h:214
~CountingAllocator() BSLS_KEYWORD_OVERRIDE
Destroy this counting allocator.
void deallocate(void *address) BSLS_KEYWORD_OVERRIDE
Definition ball_countingallocator.h:227
size_type numBytesTotal() const
Definition ball_countingallocator.h:244
void resetNumBytesTotal()
Reset the byte count maintained by this counting allocator to 0.
Definition ball_countingallocator.h:237
Definition bslma_allocator.h:545
virtual void deallocate(void *address)=0
std::size_t size_type
Definition bslma_allocator.h:593
virtual void * allocate(size_type size)=0
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
#define BSLS_KEYWORD_OVERRIDE
Definition bsls_keyword.h:695
Definition ball_administration.h:214
Definition baljsn_encoder_testtypes.h:76
static std::size_t roundUpToMaximalAlignment(std::size_t size)
Definition bsls_alignmentutil.h:522
@ BSLS_MAX_ALIGNMENT
Definition bsls_alignmentutil.h:300