aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/gh.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-02-02 15:43:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2008-02-02 15:43:00 +0000
commit0900ba10fab08dbf97afae6d9e35f2d86bfb9912 (patch)
treed9d916cb78ae9b3ee1bd824fbfc9d32401892d2d /Carpet/CarpetLib/src/gh.cc
parenta16f28b8620ea73d152c34b3d3c3089f03413b53 (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.cc22
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