diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-02 15:43:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-02 15:43:00 +0000 |
commit | 0900ba10fab08dbf97afae6d9e35f2d86bfb9912 (patch) | |
tree | d9d916cb78ae9b3ee1bd824fbfc9d32401892d2d /Carpet/CarpetLib/src/gh.cc | |
parent | a16f28b8620ea73d152c34b3d3c3089f03413b53 (diff) |
CarpetLib: Add function memoryof to measure size of data structures
Add an overloaded function memoryof which measures the size in bytes
of CarpetLib's data structures.
darcs-hash:20080202154302-dae7b-de41c79cb04617327695fae27928c05c5d431ee8.gz
Diffstat (limited to 'Carpet/CarpetLib/src/gh.cc')
-rw-r--r-- | Carpet/CarpetLib/src/gh.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/gh.cc b/Carpet/CarpetLib/src/gh.cc index 66722e11d..6a7738048 100644 --- a/Carpet/CarpetLib/src/gh.cc +++ b/Carpet/CarpetLib/src/gh.cc @@ -301,6 +301,28 @@ remove (dh * const d) +// Memory usage + +size_t +gh:: +memory () + const +{ + return + memoryof (reffacts) + + memoryof (refcent) + + memoryof (mgfact) + + memoryof (mgcent) + + memoryof (baseextents) + + memoryof (boundary_width) + + memoryof (regions) + + memoryof (oldregions) + + memoryof (ths) + + memoryof (dhs); +} + + + // Output void |