PPL Logo

MemoryPool Class Reference

#include <mempool.h>

Inheritance diagram for MemoryPool:

Inheritance graph
[legend]
Collaboration diagram for MemoryPool:

Collaboration graph
[legend]

Public Member Functions

 MemoryPool ()
 Basic initialization.
 MemoryPool (CkMigrateMessage *msg)
void pup (PUP::er &p)
int CheckPool (int sz)
 returns number of blocks of size sz in pool
void * GetBlock (int sz)
 returns a block from pool with size sz
void PutBlock (int sz, void *blk)
 puts a block of size sz in appropriate pool

Private Attributes

PoolmemPools
PoollastLook

Detailed Description

Definition at line 22 of file mempool.h.


Constructor & Destructor Documentation

MemoryPool::MemoryPool (  )  [inline]

Basic initialization.

Definition at line 28 of file mempool.h.

References Converse::CkMyPe().

MemoryPool::MemoryPool ( CkMigrateMessage msg  )  [inline]

Definition at line 33 of file mempool.h.


Member Function Documentation

void MemoryPool::pup ( PUP::er p  )  [inline, virtual]

Reimplemented from Group.

Definition at line 34 of file mempool.h.

int MemoryPool::CheckPool ( int  sz  ) 

returns number of blocks of size sz in pool

Definition at line 11 of file mempool.C.

References Pool::blockSize, lastLook, memPools, Pool::next, and Pool::numBlocks.

Referenced by eventMsg::operator delete(), and eventMsg::operator new().

void * MemoryPool::GetBlock ( int  sz  ) 

returns a block from pool with size sz

Definition at line 30 of file mempool.C.

References Pool::blockSize, lastLook, Pool::memPool, memPools, Pool::next, and Pool::numBlocks.

Referenced by eventMsg::operator new().

void MemoryPool::PutBlock ( int  sz,
void *  blk 
)

puts a block of size sz in appropriate pool

Definition at line 46 of file mempool.C.

References Pool::blockSize, lastLook, Pool::memPool, memPools, Pool::next, Pool::numBlocks, and Pool::prev.

Referenced by eventMsg::operator delete().


Field Documentation

Definition at line 24 of file mempool.h.

Referenced by CheckPool(), GetBlock(), and PutBlock().

Definition at line 25 of file mempool.h.

Referenced by CheckPool(), GetBlock(), and PutBlock().


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

Generated on Fri May 25 08:04:15 2012 for Charm++ by  doxygen 1.5.5