atomic_preallocated_pool Struct Reference

Inherits atomic_container.

Inherited by atomic_class_pool< T > [protected].

Inheritance diagram for atomic_preallocated_pool:

Inheritance graph
[legend]
Collaboration diagram for atomic_preallocated_pool:

Collaboration graph
[legend]
List of all members.

Detailed Description

A thread-safe memory pool based on the atomic container, used by atomic_class_pool.

Creates a new atomic_container with seed pre-allocated untyped items of size nbytes each. It is important to have a non-zero seed value so that atomic_container versioning works correctly.

Maintains a global freelist of fixed-sized memory chunks to recycle and provides a drop-in replacement for malloc() and free()

Definition at line 48 of file atomic_class_pool.h.

Public Member Functions

 atomic_preallocated_pool (int nbytes, long seed=128)
void * alloc ()
void dealloc (void *val)
 ~atomic_preallocated_pool ()

Public Attributes

int const _nbytes


The documentation for this struct was generated from the following file:
Generated on Wed Jul 7 17:22:42 2010 for Shore Storage Manager by  doxygen 1.4.7