Sierra Toolkit Version of the Day
eastl::fixed_hashtable_allocator< bucketCount, nodeSize, nodeCount, nodeAlignment, nodeAlignmentOffset, bEnableOverflow, Allocator > Class Template Reference

#include <fixed_pool_eastl.h>

List of all members.

Public Types

enum  {
  kBucketCount = bucketCount + 1,
  kBucketsSize = bucketCount * sizeof(void*),
  kNodeSize = nodeSize,
  kNodeCount = nodeCount,
  kNodesSize = nodeCount * nodeSize,
  kBufferSize = kNodesSize + ((nodeAlignment > 1) ? nodeSize-1 : 0) + nodeAlignmentOffset,
  kNodeAlignment = nodeAlignment,
  kNodeAlignmentOffset = nodeAlignmentOffset,
  kAllocFlagBuckets = 0x00400000
}
typedef type_select
< bEnableOverflow,
fixed_pool_with_overflow
< Allocator >, fixed_pool >
::type 
pool_type
typedef
fixed_hashtable_allocator
< bucketCount, nodeSize,
nodeCount, nodeAlignment,
nodeAlignmentOffset,
bEnableOverflow, Allocator > 
this_type
typedef Allocator overflow_allocator_type

Public Member Functions

 fixed_hashtable_allocator (void *pNodeBuffer)
 fixed_hashtable_allocator (void *pNodeBuffer, void *pBucketBuffer)
 fixed_hashtable_allocator (const this_type &x)
fixed_hashtable_allocatoroperator= (const fixed_hashtable_allocator &x)
void * allocate (size_t n, int flags=0)
void * allocate (size_t n, size_t, size_t, int flags=0)
void deallocate (void *p, size_t)
bool can_allocate () const
void reset (void *pNodeBuffer)
const char * get_name () const
void set_name (const char *pName)
overflow_allocator_type & get_overflow_allocator ()
void set_overflow_allocator (const overflow_allocator_type &allocator)

Protected Attributes

pool_type mPool
void * mpBucketBuffer

Detailed Description

template<size_t bucketCount, size_t nodeSize, size_t nodeCount, size_t nodeAlignment, size_t nodeAlignmentOffset, bool bEnableOverflow, typename Allocator = EASTLAllocatorType>
class eastl::fixed_hashtable_allocator< bucketCount, nodeSize, nodeCount, nodeAlignment, nodeAlignmentOffset, bEnableOverflow, Allocator >

fixed_hashtable_allocator

Provides a base class for fixed hashtable allocations. To consider: Have this inherit from fixed_node_allocator.

Template parameters: bucketCount The fixed number of hashtable buckets to provide. nodeCount The number of objects the pool contains. nodeAlignment The alignment of the objects to allocate. nodeAlignmentOffset The alignment offset of the objects to allocate. bEnableOverflow Whether or not we should use the overflow heap if our object pool is exhausted. Allocator Overflow allocator, which is only used if bEnableOverflow == true. Defaults to the global heap.

Definition at line 816 of file fixed_pool_eastl.h.


Constructor & Destructor Documentation

template<size_t bucketCount, size_t nodeSize, size_t nodeCount, size_t nodeAlignment, size_t nodeAlignmentOffset, bool bEnableOverflow, typename Allocator = EASTLAllocatorType>
eastl::fixed_hashtable_allocator< bucketCount, nodeSize, nodeCount, nodeAlignment, nodeAlignmentOffset, bEnableOverflow, Allocator >::fixed_hashtable_allocator ( const this_type x) [inline]

fixed_hashtable_allocator

Note that we are copying x.mpHead and mpBucketBuffer to our own fixed_pool. See the discussion above in fixed_node_allocator for important information about this.

Definition at line 868 of file fixed_pool_eastl.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends