Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/global/management/include/G4AllocatorPool.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4AllocatorPool.hh,v 1.5 2006/06/29 19:01:18 gunter Exp $
    28 // GEANT4 tag $Name: geant4-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 $
    2929//
    3030//
     
    5858      // Destructor. Return storage to the free store
    5959
    60     G4AllocatorPool(const G4AllocatorPool& right);
    61       // Copy constructor
    62 
    6360    inline void* Alloc();
    6461      // Allocate one element
     
    7168      // Return storage to the free store
    7269
     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
    7377  private:
    7478
     79    G4AllocatorPool(const G4AllocatorPool& right);
     80      // Provate copy constructor
    7581    G4AllocatorPool& operator= (const G4AllocatorPool& right);
    7682      // Private equality operator
     
    97103
    98104    const unsigned int esize;
    99     const unsigned int csize;
     105    unsigned int csize;
    100106    G4PoolChunk* chunks;
    101107    G4PoolLink* head;
     
    142148}
    143149
     150// ************************************************************
     151// GetNoPages
     152// ************************************************************
     153//
     154inline int
     155G4AllocatorPool::GetNoPages() const
     156{
     157  return nchunks;
     158}
     159
     160// ************************************************************
     161// GetPageSize
     162// ************************************************************
     163//
     164inline unsigned int
     165G4AllocatorPool::GetPageSize() const
     166{
     167  return csize;
     168}
     169
     170// ************************************************************
     171// GrowPageSize
     172// ************************************************************
     173//
     174inline void
     175G4AllocatorPool::GrowPageSize( unsigned int sz )
     176{
     177  csize = (sz) ? sz*csize : csize;
     178}
     179
    144180#endif
Note: See TracChangeset for help on using the changeset viewer.