8#ifndef INCLUDED_BDLMA_POOL
9#define INCLUDED_BDLMA_POOL
307#include <bdlscm_version.h>
319#include <bsl_cstddef.h>
362 int d_maxBlocksPerChunk;
421 int maxBlocksPerChunk,
447 template <
class TYPE>
456 template <
class TYPE>
540void *
operator new(bsl::size_t size, BloombergLP::bdlma::Pool& pool);
547void operator delete(
void *address, BloombergLP::bdlma::Pool& pool);
564 if (d_begin_p == d_end_p) {
566 Link *p = d_freeList_p;
567 d_freeList_p = p->d_next_p;
575 d_begin_p += d_internalBlockSize;
584 static_cast<Link *
>(address)->d_next_p = d_freeList_p;
585 d_freeList_p =
static_cast<Link *
>(address);
631void *
operator new(bsl::size_t size, BloombergLP::bdlma::Pool& pool)
633 using namespace BloombergLP;
639 static_cast<void>(size);
640 return pool.allocate();
644void operator delete(
void *address, BloombergLP::bdlma::Pool& pool)
648 pool.deallocate(address);
Definition bdlma_infrequentdeleteblocklist.h:241
bslma::Allocator * allocator() const
Return the allocator used by this object to supply memory.
Definition bdlma_infrequentdeleteblocklist.h:335
Definition bdlma_pool.h:335
Pool(bsls::Types::size_type blockSize, bslma::Allocator *basicAllocator=0)
Pool(bsls::Types::size_type blockSize, bsls::BlockGrowth::Strategy growthStrategy, bslma::Allocator *basicAllocator=0)
void reserveCapacity(int numBlocks)
void deleteObjectRaw(const TYPE *object)
Definition bdlma_pool.h:597
void deallocate(void *address)
Definition bdlma_pool.h:580
void deleteObject(const TYPE *object)
Definition bdlma_pool.h:590
bslma::Allocator * allocator() const
Definition bdlma_pool.h:621
bsls::Types::size_type blockSize() const
Definition bdlma_pool.h:613
void * allocate()
Definition bdlma_pool.h:562
Pool(bsls::Types::size_type blockSize, bsls::BlockGrowth::Strategy growthStrategy, int maxBlocksPerChunk, bslma::Allocator *basicAllocator=0)
void release()
Relinquish all memory currently allocated via this pool object.
Definition bdlma_pool.h:603
Definition bslma_allocator.h:457
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlma_alignedallocator.h:276
static void deleteObject(const TYPE *object, ALLOCATOR *allocator)
Definition bslma_deleterhelper.h:196
static void deleteObjectRaw(const TYPE *object, ALLOCATOR *allocator)
Definition bslma_deleterhelper.h:217
static int calculateAlignmentFromSize(std::size_t size)
Definition bsls_alignmentutil.h:344
Strategy
Definition bsls_blockgrowth.h:169
std::size_t size_type
Definition bsls_types.h:124