Protium
Math and Design Features
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Protium::Allocation::SmallObjectAllocatorImplementation Class Reference

Manages a pool of fixed allocators. More...

#include <SmallObjectAllocator.h>

Inheritance diagram for Protium::Allocation::SmallObjectAllocatorImplementation:

Public Member Functions

void * Allocate (std::size_t size, bool doThrow)
 
void Deallocate (void *p, std::size_t size)
 
void Deallocate (void *p)
 
std::size_t GetAlignment () const
 
std::size_t GetMaxObjectSize () const
 
bool IsCorrupt (void) const
 
bool TrimExcessMemory (void)
 

Protected Member Functions

 SmallObjectAllocatorImplementation (std::size_t pageSize, std::size_t maxObjectSize, std::size_t objectAlignSize)
 
 ~SmallObjectAllocatorImplementation (void)
 

Private Member Functions

 SmallObjectAllocatorImplementation (void)
 
 SmallObjectAllocatorImplementation (const SmallObjectAllocatorImplementation &)
 
SmallObjectAllocatorImplementationoperator= (const SmallObjectAllocatorImplementation &)
 

Private Attributes

const std::size_t fAlignSize
 
const std::size_t fMaxObjectSize
 
Protium::Allocation::FixedAllocatorfPool
 

Detailed Description

Manages a pool of fixed allocators.

Definition at line 19 of file SmallObjectAllocator.h.

Constructor & Destructor Documentation

Protium::Allocation::SmallObjectAllocatorImplementation::SmallObjectAllocatorImplementation ( std::size_t  pageSize,
std::size_t  maxObjectSize,
std::size_t  objectAlignSize 
)
protected

Definition at line 16 of file SmallObjectAllocator.cxx.

Protium::Allocation::SmallObjectAllocatorImplementation::~SmallObjectAllocatorImplementation ( void  )
protected

Definition at line 29 of file SmallObjectAllocator.cxx.

Protium::Allocation::SmallObjectAllocatorImplementation::SmallObjectAllocatorImplementation ( void  )
private
Protium::Allocation::SmallObjectAllocatorImplementation::SmallObjectAllocatorImplementation ( const SmallObjectAllocatorImplementation )
private

Member Function Documentation

void * Protium::Allocation::SmallObjectAllocatorImplementation::Allocate ( std::size_t  size,
bool  doThrow 
)

Definition at line 44 of file SmallObjectAllocator.cxx.

void Protium::Allocation::SmallObjectAllocatorImplementation::Deallocate ( void *  p,
std::size_t  size 
)

Definition at line 68 of file SmallObjectAllocator.cxx.

void Protium::Allocation::SmallObjectAllocatorImplementation::Deallocate ( void *  p)

Definition at line 89 of file SmallObjectAllocator.cxx.

std::size_t Protium::Allocation::SmallObjectAllocatorImplementation::GetAlignment ( ) const
inline

Definition at line 32 of file SmallObjectAllocator.h.

std::size_t Protium::Allocation::SmallObjectAllocatorImplementation::GetMaxObjectSize ( ) const
inline

Definition at line 31 of file SmallObjectAllocator.h.

bool Protium::Allocation::SmallObjectAllocatorImplementation::IsCorrupt ( void  ) const

Definition at line 115 of file SmallObjectAllocator.cxx.

SmallObjectAllocatorImplementation& Protium::Allocation::SmallObjectAllocatorImplementation::operator= ( const SmallObjectAllocatorImplementation )
private
bool Protium::Allocation::SmallObjectAllocatorImplementation::TrimExcessMemory ( void  )

Definition at line 33 of file SmallObjectAllocator.cxx.

Member Data Documentation

const std::size_t Protium::Allocation::SmallObjectAllocatorImplementation::fAlignSize
private

Definition at line 23 of file SmallObjectAllocator.h.

const std::size_t Protium::Allocation::SmallObjectAllocatorImplementation::fMaxObjectSize
private

Definition at line 22 of file SmallObjectAllocator.h.

Protium::Allocation::FixedAllocator* Protium::Allocation::SmallObjectAllocatorImplementation::fPool
private

Definition at line 21 of file SmallObjectAllocator.h.