block_alloc< T, MaxBytes > Struct Template Reference

Collaboration diagram for block_alloc< T, MaxBytes >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T, size_t MaxBytes = 0>
struct block_alloc< T, MaxBytes >

Per-thread per-type heap.

Caller must apply constructor, using normal syntax for new, but with friend template, as follows:

 obj = new (*pool) T(args);

To delete an object, client uses

 pool->destroy_object(obj)
which applies the destructor and then releases the object back to the pool.

Definition at line 289 of file block_alloc.h.

Public Types

typedef block_pool< T, dynpool,
MaxBytes > 
Pool

Public Member Functions

void recycle ()
 Let the zombies (released-but-not-yet-reusable chips) become usable again.
size_t freelist_size () const

Static Public Member Functions

static void destroy_object (T *ptr)


The documentation for this struct was generated from the following file:
Generated on Mon Jan 2 15:14:03 2012 for Shore Storage Manager by  doxygen 1.4.7