8#ifndef INCLUDED_BDLMA_POOL
9#define INCLUDED_BDLMA_POOL
310#include <bdlscm_version.h>
322#include <bsl_cstddef.h>
368 int d_maxBlocksPerChunk;
428 int maxBlocksPerChunk,
457 template <
class TYPE>
467 template <
class TYPE>
556void *
operator new(bsl::size_t size, BloombergLP::bdlma::Pool& pool);
565void operator delete(
void *address, BloombergLP::bdlma::Pool& pool);
582 if (d_begin_p == d_end_p) {
584 Link *p = d_freeList_p;
585 d_freeList_p = p->d_next_p;
593 d_begin_p += d_internalBlockSize;
602 static_cast<Link *
>(address)->d_next_p = d_freeList_p;
603 d_freeList_p =
static_cast<Link *
>(address);
649void *
operator new(bsl::size_t size, BloombergLP::bdlma::Pool& pool)
651 using namespace BloombergLP;
657 static_cast<void>(size);
658 return pool.allocate();
662void operator delete(
void *address, BloombergLP::bdlma::Pool& pool)
666 pool.deallocate(address);
Definition bdlma_infrequentdeleteblocklist.h:245
bslma::Allocator * allocator() const
Return the allocator used by this object to supply memory.
Definition bdlma_infrequentdeleteblocklist.h:342
Definition bdlma_pool.h:338
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:615
void deallocate(void *address)
Definition bdlma_pool.h:598
void deleteObject(const TYPE *object)
Definition bdlma_pool.h:608
bslma::Allocator * allocator() const
Definition bdlma_pool.h:639
bsls::Types::size_type blockSize() const
Definition bdlma_pool.h:631
void * allocate()
Definition bdlma_pool.h:580
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:621
Definition bslma_allocator.h:545
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1917
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlma_alignedallocator.h:278
static void deleteObject(const TYPE *object, ALLOCATOR *allocator)
Definition bslma_deleterhelper.h:204
static void deleteObjectRaw(const TYPE *object, ALLOCATOR *allocator)
Definition bslma_deleterhelper.h:225
static int calculateAlignmentFromSize(std::size_t size)
Definition bsls_alignmentutil.h:398
Strategy
Definition bsls_blockgrowth.h:172
std::size_t size_type
Definition bsls_types.h:126