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/G4Allocator.hh

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4Allocator.hh,v 1.20 2010/03/30 08:17:24 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4Allocator.hh,v 1.21 2010/04/01 12:43:12 gcosmo Exp $
     28// GEANT4 tag $Name: global-V09-03-22 $
    2929//
    3030//
     
    6666
    6767    inline void ResetStorage();
    68       // Returns allocated storage to the free store, resets
    69       // allocator and page sizes.
     68      // Returns allocated storage to the free store, resets allocator.
    7069      // Note: contents in memory are lost using this call !
    7170
    7271    inline size_t GetAllocatedSize() const;
    7372      // Returns the size of the total memory allocated
     73    inline int GetNoPages() const;
     74      // Returns the total number of allocated pages
     75    inline size_t GetPageSize() const;
     76      // Returns the current size of a page
     77    inline void IncreasePageSize( unsigned int sz );
     78      // Resets allocator and increases default page size of a given factor
    7479
    7580  public:  // without description
     
    213218
    214219// ************************************************************
     220// GetNoPages
     221// ************************************************************
     222//
     223template <class Type>
     224int G4Allocator<Type>::GetNoPages() const
     225{
     226  return mem.GetNoPages();
     227}
     228
     229// ************************************************************
     230// GetPageSize
     231// ************************************************************
     232//
     233template <class Type>
     234size_t G4Allocator<Type>::GetPageSize() const
     235{
     236  return mem.GetPageSize();
     237}
     238
     239// ************************************************************
     240// IncreasePageSize
     241// ************************************************************
     242//
     243template <class Type>
     244void G4Allocator<Type>::IncreasePageSize( unsigned int sz )
     245{
     246  ResetStorage();
     247  mem.GrowPageSize(sz);
     248}
     249
     250// ************************************************************
    215251// operator==
    216252// ************************************************************
Note: See TracChangeset for help on using the changeset viewer.