#include <mempool.h>
Public Member Functions | |
MemoryPool () | |
Basic initialization. | |
MemoryPool (CkMigrateMessage *msg) | |
void | pup (PUP::er &p) |
Pack/UnPack - tell the runtime how to serialize this class's data for migration, checkpoint, etc. | |
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 | |
Pool * | memPools |
Pool * | lastLook |
Definition at line 22 of file mempool.h.
MemoryPool::MemoryPool | ( | ) | [inline] |
Basic initialization.
Definition at line 28 of file mempool.h.
References Converse::CkMyPe().
MemoryPool::MemoryPool | ( | CkMigrateMessage * | msg | ) | [inline] |
void MemoryPool::pup | ( | PUP::er & | p | ) | [inline, virtual] |
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().
Pool* MemoryPool::memPools [private] |
Pool* MemoryPool::lastLook [private] |