8#ifndef INCLUDED_BSLMA_SEQUENTIALPOOL
9#define INCLUDED_BSLMA_SEQUENTIALPOOL
409#ifdef BDE_OPENSOURCE_PUBLICATION
410#error "bslma_sequentialpool is deprecated"
444 enum GrowthStrategy {
466 GrowthStrategy d_growthStrategy;
481 int calculateNextBufferSize(
int size)
const;
637 template <
class TYPE>
644 template <
class TYPE>
657 int expand(
void *address,
int originalNumBytes);
670 int expand(
void *address,
int originalNumBytes,
int maxNumBytes);
692 int truncate(
void *address,
int originalNumBytes,
int newNumBytes);
753void *
operator new(std::size_t size, BloombergLP::bslma::SequentialPool& pool);
762void operator delete(
void *address, BloombergLP::bslma::SequentialPool& pool);
787#if defined(BSLS_PLATFORM_CMP_SUN) && BSLS_PLATFORM_CMP_VERSION < 0x5130
788 const_cast<TYPE *
>(object)->~TYPE();
804#ifndef BDE_OPENSOURCE_PUBLICATION
818void *
operator new(std::size_t size, BloombergLP::bslma::SequentialPool& pool)
820 return pool.
allocate(
static_cast<int>(size));
824void operator delete(
void *, BloombergLP::bslma::SequentialPool&)
Definition bslma_allocator.h:545
AlignmentStrategy
Types of alignment strategy to allocate memory.
Definition bslma_bufferallocator.h:274
Definition bslma_infrequentdeleteblocklist.h:217
Definition bslma_sequentialpool.h:441
SequentialPool(int initialSize, BufferAllocator::AlignmentStrategy strategy, Allocator *basicAllocator=0)
SequentialPool(char *buffer, int bufferSize, BufferAllocator::AlignmentStrategy strategy, Allocator *basicAllocator=0)
void * allocateAndExpand(int *size, int maxNumBytes)
SequentialPool(int initialSize, Allocator *basicAllocator=0)
void deleteObjectRaw(const TYPE *object)
Definition bslma_sequentialpool.h:784
SequentialPool(char *buffer, int bufferSize, Allocator *basicAllocator=0)
void reserveCapacity(int numBytes)
SequentialPool(int initialSize, int maxBufferSize, Allocator *basicAllocator=0)
~SequentialPool()
Definition bslma_sequentialpool.h:777
int truncate(void *address, int originalNumBytes, int newNumBytes)
SequentialPool(BufferAllocator::AlignmentStrategy strategy, Allocator *basicAllocator=0)
SequentialPool(int initialSize, int maxBufferSize, BufferAllocator::AlignmentStrategy strategy, Allocator *basicAllocator=0)
int expand(void *address, int originalNumBytes)
void * allocateAndExpand(int *size)
void deleteObject(const TYPE *object)
Definition bslma_sequentialpool.h:797
void * allocate(int size)
SequentialPool(char *buffer, int bufferSize, int maxBufferSize, Allocator *basicAllocator=0)
void release()
Release all memory currently allocated through this pool.
SequentialPool(Allocator *basicAllocator=0)
SequentialPool(char *buffer, int bufferSize, int maxBufferSize, BufferAllocator::AlignmentStrategy strategy, Allocator *basicAllocator=0)
int expand(void *address, int originalNumBytes, int maxNumBytes)
bslma::SequentialPool bslma_SequentialPool
This alias is defined for backward compatibility.
Definition bslma_sequentialpool.h:810
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition baljsn_encoder_testtypes.h:76