Geant4  10.00.p03
G4AllocatorPool Class Reference

#include <G4AllocatorPool.hh>

+ Collaboration diagram for G4AllocatorPool:

Classes

class  G4PoolChunk
 
struct  G4PoolLink
 

Public Member Functions

 G4AllocatorPool (unsigned int n=0)
 
 ~G4AllocatorPool ()
 
void * Alloc ()
 
void Free (void *b)
 
unsigned int Size () const
 
void Reset ()
 
int GetNoPages () const
 
unsigned int GetPageSize () const
 
void GrowPageSize (unsigned int factor)
 

Private Member Functions

 G4AllocatorPool (const G4AllocatorPool &right)
 
G4AllocatorPooloperator= (const G4AllocatorPool &right)
 
void Grow ()
 

Private Attributes

const unsigned int esize
 
unsigned int csize
 
G4PoolChunkchunks
 
G4PoolLinkhead
 
int nchunks
 

Detailed Description

Definition at line 50 of file G4AllocatorPool.hh.

Constructor & Destructor Documentation

G4AllocatorPool::G4AllocatorPool ( unsigned int  n = 0)
explicit

Definition at line 44 of file G4AllocatorPool.cc.

G4AllocatorPool::~G4AllocatorPool ( )

Definition at line 79 of file G4AllocatorPool.cc.

References Reset().

+ Here is the call graph for this function:

G4AllocatorPool::G4AllocatorPool ( const G4AllocatorPool right)
private

Definition at line 55 of file G4AllocatorPool.cc.

Member Function Documentation

void * G4AllocatorPool::Alloc ( )
inline

Definition at line 119 of file G4AllocatorPool.hh.

References Grow(), head, and G4AllocatorPool::G4PoolLink::next.

+ Here is the call graph for this function:

void G4AllocatorPool::Free ( void *  b)
inline

Definition at line 132 of file G4AllocatorPool.hh.

References head, and G4AllocatorPool::G4PoolLink::next.

int G4AllocatorPool::GetNoPages ( ) const
inline

Definition at line 154 of file G4AllocatorPool.hh.

References nchunks.

unsigned int G4AllocatorPool::GetPageSize ( ) const
inline

Definition at line 164 of file G4AllocatorPool.hh.

References csize.

void G4AllocatorPool::Grow ( )
private

Definition at line 109 of file G4AllocatorPool.cc.

References chunks, csize, esize, head, G4AllocatorPool::G4PoolChunk::mem, n, nchunks, and G4AllocatorPool::G4PoolChunk::next.

Referenced by Alloc().

+ Here is the caller graph for this function:

void G4AllocatorPool::GrowPageSize ( unsigned int  factor)
inline

Definition at line 174 of file G4AllocatorPool.hh.

References csize.

G4AllocatorPool & G4AllocatorPool::operator= ( const G4AllocatorPool right)
private

Definition at line 66 of file G4AllocatorPool.cc.

References chunks, head, and nchunks.

void G4AllocatorPool::Reset ( )

Definition at line 88 of file G4AllocatorPool.cc.

References chunks, head, n, nchunks, and G4AllocatorPool::G4PoolChunk::next.

Referenced by ~G4AllocatorPool().

+ Here is the caller graph for this function:

unsigned int G4AllocatorPool::Size ( ) const
inline

Definition at line 144 of file G4AllocatorPool.hh.

References csize, and nchunks.

Member Data Documentation

G4PoolChunk* G4AllocatorPool::chunks
private

Definition at line 105 of file G4AllocatorPool.hh.

Referenced by Grow(), operator=(), and Reset().

unsigned int G4AllocatorPool::csize
private

Definition at line 104 of file G4AllocatorPool.hh.

Referenced by GetPageSize(), Grow(), GrowPageSize(), and Size().

const unsigned int G4AllocatorPool::esize
private

Definition at line 103 of file G4AllocatorPool.hh.

Referenced by Grow().

G4PoolLink* G4AllocatorPool::head
private

Definition at line 106 of file G4AllocatorPool.hh.

Referenced by Alloc(), Free(), Grow(), operator=(), and Reset().

int G4AllocatorPool::nchunks
private

Definition at line 107 of file G4AllocatorPool.hh.

Referenced by GetNoPages(), Grow(), operator=(), Reset(), and Size().


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