8#ifndef INCLUDED_BDLMA_CONCURRENTPOOL
9#define INCLUDED_BDLMA_CONCURRENTPOOL
296#include <bdlscm_version.h>
313#include <bsl_cstddef.h>
347 bsls::AtomicOperations::AtomicTypes::Int d_refCount;
350 Link *
volatile d_next_p;
365 int d_maxBlocksPerChunk;
420 int maxBlocksPerChunk,
449 template <
class TYPE>
459 template <
class TYPE>
526void *
operator new(bsl::size_t size, BloombergLP::bdlma::ConcurrentPool& pool);
560void operator delete(
void *address, BloombergLP::bdlma::ConcurrentPool& pool);
592 d_freeList = (Link*)0;
617void *
operator new(bsl::size_t size, BloombergLP::bdlma::ConcurrentPool& pool)
619#if defined(BSLS_ASSERT_SAFE_IS_USED)
623 typedef BloombergLP::bsls::AlignmentUtil Util;
626 && Util::calculateAlignmentFromSize(size)
627 <= Util::calculateAlignmentFromSize(pool.blockSize()));
630 static_cast<void>(size);
631 return pool.allocate();
635void operator delete(
void *address, BloombergLP::bdlma::ConcurrentPool& pool)
637 pool.deallocate(address);
Definition bdlma_concurrentpool.h:332
void deleteObjectRaw(const TYPE *object)
Definition bdlma_concurrentpool.h:583
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:589
bslma::Allocator * allocator() const
Definition bdlma_concurrentpool.h:607
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:576
bsls::Types::size_type blockSize() const
Definition bdlma_concurrentpool.h:599
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 bslma_allocator.h:545
Definition bslmt_mutex.h:317
void lock()
Definition bslmt_mutex.h:399
void unlock()
Definition bslmt_mutex.h:417
Definition bsls_atomic.h:1362
#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
AlignmentToType< BSLS_MAX_ALIGNMENT >::Type MaxAlignedType
Definition bsls_alignmentutil.h:307
Strategy
Definition bsls_blockgrowth.h:172
std::size_t size_type
Definition bsls_types.h:126