BaseHoardManager< SuperblockType_ > Class Template Reference

The top of the hoard manager hierarchy. More...

#include <basehoardmanager.h>

Inheritance diagram for BaseHoardManager< SuperblockType_ >:
EmptyHoardManager< SuperblockType_ > Hoard::HoardManager< SourceHeap, ParentHeap, SuperblockType_, EmptinessClasses, LockType, thresholdFunctionClass, HeapType >

List of all members.

Public Types

typedef SuperblockType_ SuperblockType

Public Member Functions

 BaseHoardManager (void)
virtual ~BaseHoardManager (void)
int isValid (void) const
virtual void free (void *)
 Free an object.
virtual void lock (void)
 Lock this memory manager.
virtual void unlock (void)
 Unlock this memory manager.

Static Public Member Functions

static size_t getSize (void *ptr)
 Return the size of an object.
static SuperblockTypegetSuperblock (void *ptr)
 Find the superblock corresponding to a pointer via bitmasking.

Private Types

enum  { SuperblockSize = sizeof(SuperblockType) }

Private Attributes

HL::sassert<((SuperblockSize
&(SuperblockSize-1))==0)> 
EnsureSuperblockSizeIsPowerOfTwo
const unsigned long _magic

Detailed Description

template<class SuperblockType_>
class BaseHoardManager< SuperblockType_ >

The top of the hoard manager hierarchy.


Member Typedef Documentation

template<class SuperblockType_>
typedef SuperblockType_ BaseHoardManager< SuperblockType_ >::SuperblockType

Member Enumeration Documentation

template<class SuperblockType_>
anonymous enum [private]
Enumerator:
SuperblockSize 

Constructor & Destructor Documentation

template<class SuperblockType_>
BaseHoardManager< SuperblockType_ >::BaseHoardManager ( void   )  [inline]
template<class SuperblockType_>
virtual BaseHoardManager< SuperblockType_ >::~BaseHoardManager ( void   )  [inline, virtual]

Member Function Documentation

template<class SuperblockType_>
virtual void BaseHoardManager< SuperblockType_ >::free ( void *   )  [inline, virtual]
template<class SuperblockType_>
static size_t BaseHoardManager< SuperblockType_ >::getSize ( void *  ptr  )  [inline, static]

Return the size of an object.

template<class SuperblockType_>
static SuperblockType* BaseHoardManager< SuperblockType_ >::getSuperblock ( void *  ptr  )  [inline, static]

Find the superblock corresponding to a pointer via bitmasking.

Note:
All superblocks must be naturally aligned, and powers of two.
template<class SuperblockType_>
int BaseHoardManager< SuperblockType_ >::isValid ( void   )  const [inline]
template<class SuperblockType_>
virtual void BaseHoardManager< SuperblockType_ >::lock ( void   )  [inline, virtual]
template<class SuperblockType_>
virtual void BaseHoardManager< SuperblockType_ >::unlock ( void   )  [inline, virtual]

Member Data Documentation

template<class SuperblockType_>
const unsigned long BaseHoardManager< SuperblockType_ >::_magic [private]
template<class SuperblockType_>
HL::sassert<((SuperblockSize & (SuperblockSize - 1)) == 0)> BaseHoardManager< SuperblockType_ >::EnsureSuperblockSizeIsPowerOfTwo [private]

The documentation for this class was generated from the following file:
Generated on Tue Aug 2 11:51:26 2011 for Galois by  doxygen 1.6.3