#include <G4AllocatorPool.hh>
Definition at line 50 of file G4AllocatorPool.hh.
◆ G4AllocatorPool() [1/2]
G4AllocatorPool::G4AllocatorPool |
( |
unsigned int |
n = 0 | ) |
|
|
explicit |
Definition at line 44 of file G4AllocatorPool.cc.
45 :
esize(sz<
sizeof(G4PoolLink) ?
sizeof(G4PoolLink) : sz),
46 csize(sz<1024/2-16 ? 1024-16 : sz*10-16),
◆ ~G4AllocatorPool()
G4AllocatorPool::~G4AllocatorPool |
( |
| ) |
|
◆ G4AllocatorPool() [2/2]
◆ Alloc()
void * G4AllocatorPool::Alloc |
( |
| ) |
|
|
inline |
◆ Free()
void G4AllocatorPool::Free |
( |
void * |
b | ) |
|
|
inline |
◆ GetNoPages()
int G4AllocatorPool::GetNoPages |
( |
| ) |
const |
|
inline |
◆ GetPageSize()
unsigned int G4AllocatorPool::GetPageSize |
( |
| ) |
const |
|
inline |
◆ Grow()
void G4AllocatorPool::Grow |
( |
| ) |
|
|
private |
Definition at line 109 of file G4AllocatorPool.cc.
114 G4PoolChunk*
n =
new G4PoolChunk(
csize);
120 char* start = n->mem;
121 char* last = &start[(nelem-1)*
esize];
122 for (
char* p=start; p<last; p+=
esize)
124 reinterpret_cast<G4PoolLink*
>(p)->next
125 = reinterpret_cast<G4PoolLink*>(p+
esize);
127 reinterpret_cast<G4PoolLink*
>(last)->next = 0;
128 head =
reinterpret_cast<G4PoolLink*
>(start);
◆ GrowPageSize()
void G4AllocatorPool::GrowPageSize |
( |
unsigned int |
factor | ) |
|
|
inline |
◆ operator=()
◆ Reset()
void G4AllocatorPool::Reset |
( |
| ) |
|
◆ Size()
unsigned int G4AllocatorPool::Size |
( |
| ) |
const |
|
inline |
◆ chunks
◆ csize
unsigned int G4AllocatorPool::csize |
|
private |
◆ esize
const unsigned int G4AllocatorPool::esize |
|
private |
◆ head
◆ nchunks
int G4AllocatorPool::nchunks |
|
private |
The documentation for this class was generated from the following files: