ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/brains/BlockSnapshotManager.cpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/brains/BlockSnapshotManager.cpp (file contents):
Revision 2036 by tim, Tue Feb 15 19:39:56 2005 UTC vs.
Revision 2038 by tim, Wed Feb 16 20:30:50 2005 UTC

# Line 40 | Line 40
40   */
41   #include <algorithm>
42   #include "brains/BlockSnapshotManager.hpp"
43 + #include "utils/residentMem.h"
44   #include "utils/physmem.h"
45   #include "utils/Algorithm.hpp"
46   #include "brains/SimInfo.hpp"
# Line 54 | Line 55 | BlockSnapshotManager::BlockSnapshotManager(SimInfo* in
55      nAtoms_ = info->getNGlobalAtoms();
56      nRigidBodies_ = info->getNGlobalRigidBodies();
57  
58 +    double physMem = physmem_total();
59      double avalPhysMem = physmem_available();
60 <    
60 >    double rssMem = residentMem();
61 >
62 >    std::cout << "physmem = " << physMem << "\t availablePhysMem = " << avalPhysMem << "\trssMem =  "<< rssMem<<std::endl;
63      int bytesPerStuntDouble = DataStorage::getBytesPerStuntDouble(storageLayout);
64  
65      int bytesPerFrame = (nRigidBodies_ + nAtoms_) * bytesPerStuntDouble;
66  
67 <    int frameCapacity = int (avalPhysMem / bytesPerFrame);
67 >    int frameCapacity = int (rssMem / bytesPerFrame);
68      
69      nSnapshotPerBlock_ = frameCapacity /blockCapacity_ ;
70  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines