OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Pool Class Reference

#include <Pool.h>

Collaboration diagram for Pool:
Collaboration graph
[legend]

Classes

struct  Link
 

Public Member Functions

 Pool ()
 
 Pool (size_t)
 
 ~Pool ()
 
void * alloc ()
 
void free (void *b)
 

Static Public Member Functions

static size_t log2_align ()
 
static size_t align ()
 
static size_t align_mask ()
 
static size_t round_to_align (size_t s)
 

Private Member Functions

void grow ()
 

Static Private Member Functions

static size_t page ()
 
static int blocks_in_page (size_t sz)
 

Private Attributes

int outstandingAllocs
 
size_t bsize
 
size_t nblock
 
Linkhead
 
std::vector< char * > chunks
 

Detailed Description

Definition at line 18 of file Pool.h.

Constructor & Destructor Documentation

Pool::Pool ( )

Definition at line 34 of file Pool.cpp.

Pool::Pool ( size_t  sz)

Definition at line 43 of file Pool.cpp.

Pool::~Pool ( )

Definition at line 52 of file Pool.cpp.

References chunks, outstandingAllocs, and PInsist.

Member Function Documentation

static size_t Pool::align ( )
inlinestatic

Definition at line 31 of file Pool.h.

References log2_align().

Referenced by align_mask(), and round_to_align().

Here is the call graph for this function:

static size_t Pool::align_mask ( )
inlinestatic

Definition at line 32 of file Pool.h.

References align().

Referenced by round_to_align().

Here is the call graph for this function:

void* Pool::alloc ( )
inline

Definition at line 54 of file Pool.h.

References grow(), head, Pool::Link::next, and outstandingAllocs.

Referenced by Pooled< LField< T, Dim > >::operator new().

Here is the call graph for this function:

static int Pool::blocks_in_page ( size_t  sz)
inlinestaticprivate

Definition at line 23 of file Pool.h.

References page().

Here is the call graph for this function:

void Pool::free ( void *  b)
inline

Definition at line 72 of file Pool.h.

References head, Pool::Link::next, and outstandingAllocs.

Referenced by Pooled< LField< T, Dim > >::operator delete().

void Pool::grow ( )
private

Definition at line 63 of file Pool.cpp.

References bsize, chunks, head, nblock, and page().

Referenced by alloc().

Here is the call graph for this function:

static size_t Pool::log2_align ( )
inlinestatic

Definition at line 30 of file Pool.h.

Referenced by align().

static size_t Pool::page ( )
inlinestaticprivate

Definition at line 22 of file Pool.h.

Referenced by blocks_in_page(), and grow().

static size_t Pool::round_to_align ( size_t  s)
inlinestatic

Definition at line 34 of file Pool.h.

References align(), and align_mask().

Here is the call graph for this function:

Member Data Documentation

size_t Pool::bsize
private

Definition at line 82 of file Pool.h.

Referenced by grow().

std::vector<char*> Pool::chunks
private

Definition at line 85 of file Pool.h.

Referenced by grow(), and ~Pool().

Link* Pool::head
private

Definition at line 84 of file Pool.h.

Referenced by alloc(), free(), and grow().

size_t Pool::nblock
private

Definition at line 83 of file Pool.h.

Referenced by grow().

int Pool::outstandingAllocs
private

Definition at line 81 of file Pool.h.

Referenced by alloc(), free(), and ~Pool().


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