8#ifndef INCLUDED_BDLMA_CONCURRENTPOOL
9#define INCLUDED_BDLMA_CONCURRENTPOOL
296#include <bdlscm_version.h>
313#include <bsl_cstddef.h>
344 bsls::AtomicOperations::AtomicTypes::Int d_refCount;
347 Link *
volatile d_next_p;
362 int d_maxBlocksPerChunk;
415 int maxBlocksPerChunk,
441 template <
class TYPE>
450 template <
class TYPE>
512void *
operator new(bsl::size_t size, BloombergLP::bdlma::ConcurrentPool& pool);
545void operator delete(
void *address, BloombergLP::bdlma::ConcurrentPool& pool);
577 d_freeList = (Link*)0;
602void *
operator new(bsl::size_t size, BloombergLP::bdlma::ConcurrentPool& pool)
604#if defined(BSLS_ASSERT_SAFE_IS_USED)
608 typedef BloombergLP::bsls::AlignmentUtil Util;
611 && Util::calculateAlignmentFromSize(size)
612 <= Util::calculateAlignmentFromSize(pool.blockSize()));
615 static_cast<void>(size);
616 return pool.allocate();
620void operator delete(
void *address, BloombergLP::bdlma::ConcurrentPool& pool)
622 pool.deallocate(address);
Definition bdlma_concurrentpool.h:332
void deleteObjectRaw(const TYPE *object)
Definition bdlma_concurrentpool.h:568
ConcurrentPool(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_concurrentpool.h:574
bslma::Allocator * allocator() const
Definition bdlma_concurrentpool.h:592
ConcurrentPool(bsls::Types::size_type blockSize, bslma::Allocator *basicAllocator=0)
void reserveCapacity(int numBlocks)
void deallocate(void *address)
ConcurrentPool(bsls::Types::size_type blockSize, bsls::BlockGrowth::Strategy growthStrategy, bslma::Allocator *basicAllocator=0)
void deleteObject(const TYPE *object)
Definition bdlma_concurrentpool.h:561
bsls::Types::size_type blockSize() const
Definition bdlma_concurrentpool.h:584
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 bslma_allocator.h:457
Definition bslmt_mutex.h:315
void lock()
Definition bslmt_mutex.h:392
void unlock()
Definition bslmt_mutex.h:410
Definition bsls_atomic.h:1349
#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
AlignmentToType< BSLS_MAX_ALIGNMENT >::Type MaxAlignedType
Definition bsls_alignmentutil.h:282
Strategy
Definition bsls_blockgrowth.h:169
std::size_t size_type
Definition bsls_types.h:124