8#ifndef INCLUDED_BALL_COUNTINGALLOCATOR
9#define INCLUDED_BALL_COUNTINGALLOCATOR
114#include <balscm_version.h>
205, d_allocator_p(
bslma::Default::allocator(basicAllocator))
217 d_byteCount += totalSize;
218 void *address = d_allocator_p->
allocate(totalSize);
219 *((
int *)address) =
static_cast<int>(totalSize);
228 d_byteCount -= *((
int *)address);
Definition ball_countingallocator.h:138
void * allocate(size_type size) BSLS_KEYWORD_OVERRIDE
Definition ball_countingallocator.h:211
~CountingAllocator() BSLS_KEYWORD_OVERRIDE
Destroy this counting allocator.
void deallocate(void *address) BSLS_KEYWORD_OVERRIDE
Definition ball_countingallocator.h:224
size_type numBytesTotal() const
Definition ball_countingallocator.h:241
void resetNumBytesTotal()
Reset the byte count maintained by this counting allocator to 0.
Definition ball_countingallocator.h:234
Definition bslma_allocator.h:457
virtual void deallocate(void *address)=0
std::size_t size_type
Definition bslma_allocator.h:499
virtual void * allocate(size_type size)=0
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_OVERRIDE
Definition bsls_keyword.h:653
Definition ball_administration.h:214
Definition balxml_encoderoptions.h:68
static std::size_t roundUpToMaximalAlignment(std::size_t size)
Definition bsls_alignmentutil.h:452
@ BSLS_MAX_ALIGNMENT
Definition bsls_alignmentutil.h:275