Loki  0.1.7
Loki::SmallObject< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy > Class Template Reference

#include <SmallObj.h>

Inheritance diagram for Loki::SmallObject< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy >:
Collaboration diagram for Loki::SmallObject< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy >:

Additional Inherited Members

- Public Types inherited from Loki::SmallObjectBase< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy >
typedef AllocatorSingleton< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy > ObjAllocatorSingleton
 
- Static Public Member Functions inherited from Loki::SmallObjectBase< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy >
static void * operator new (std::size_t size) throw ( std::bad_alloc )
 Throwing single-object new throws bad_alloc when allocation fails.
 
static void * operator new (std::size_t size, const std::nothrow_t &) throw ()
 Non-throwing single-object new returns NULL if allocation fails.
 
static void * operator new (std::size_t size, void *place)
 Placement single-object new merely calls global placement new.
 
static void operator delete (void *p, std::size_t size) throw ()
 Single-object delete.
 
static void operator delete (void *p, const std::nothrow_t &) throw ()
 
static void operator delete (void *p, void *place)
 Placement single-object delete merely calls global placement delete.
 

Detailed Description

template<template< class, class > class ThreadingModel = ::Loki::SingleThreaded, std::size_t chunkSize = 4096, std::size_t maxSmallObjectSize = 256, std::size_t objectAlignSize = 4, template< class > class LifetimePolicy = ::Loki::LongevityLifetime::DieAsSmallObjectParent, class MutexPolicy = ::Loki::Mutex>
class Loki::SmallObject< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy >

SmallObject Base class for polymorphic small objects, offers fast allocations & deallocations. Destructor is virtual and public. Default constructor is trivial. Copy-constructor and copy-assignment operator are not implemented since polymorphic classes almost always disable those operations. Class has no data members so compilers can use Empty-Base-Optimization.


The documentation for this class was generated from the following file: