- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/global/management/include/G4AllocatorPool.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4AllocatorPool.hh,v 1. 5 2006/06/29 19:01:18 gunterExp $28 // GEANT4 tag $Name: g eant4-09-04-beta-01$27 // $Id: G4AllocatorPool.hh,v 1.7 2010/07/14 10:45:46 gcosmo Exp $ 28 // GEANT4 tag $Name: global-V09-03-22 $ 29 29 // 30 30 // … … 58 58 // Destructor. Return storage to the free store 59 59 60 G4AllocatorPool(const G4AllocatorPool& right);61 // Copy constructor62 63 60 inline void* Alloc(); 64 61 // Allocate one element … … 71 68 // Return storage to the free store 72 69 70 inline int GetNoPages() const; 71 // Return the total number of allocated pages 72 inline unsigned int GetPageSize() const; 73 // Accessor for default page size 74 inline void GrowPageSize( unsigned int factor ); 75 // Increase default page size by a given factor 76 73 77 private: 74 78 79 G4AllocatorPool(const G4AllocatorPool& right); 80 // Provate copy constructor 75 81 G4AllocatorPool& operator= (const G4AllocatorPool& right); 76 82 // Private equality operator … … 97 103 98 104 const unsigned int esize; 99 constunsigned int csize;105 unsigned int csize; 100 106 G4PoolChunk* chunks; 101 107 G4PoolLink* head; … … 142 148 } 143 149 150 // ************************************************************ 151 // GetNoPages 152 // ************************************************************ 153 // 154 inline int 155 G4AllocatorPool::GetNoPages() const 156 { 157 return nchunks; 158 } 159 160 // ************************************************************ 161 // GetPageSize 162 // ************************************************************ 163 // 164 inline unsigned int 165 G4AllocatorPool::GetPageSize() const 166 { 167 return csize; 168 } 169 170 // ************************************************************ 171 // GrowPageSize 172 // ************************************************************ 173 // 174 inline void 175 G4AllocatorPool::GrowPageSize( unsigned int sz ) 176 { 177 csize = (sz) ? sz*csize : csize; 178 } 179 144 180 #endif
Note: See TracChangeset
for help on using the changeset viewer.