aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/th.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
commit1beb710e75a868f71b74ca5a2b13017593a4469e (patch)
treed9d916cb78ae9b3ee1bd824fbfc9d32401892d2d /Carpet/CarpetLib/src/th.cc
parentd2d5504fd8975ae714d70cbdda4805d49f0c5bf5 (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/th.cc')
-rw-r--r--Carpet/CarpetLib/src/th.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/th.cc b/Carpet/CarpetLib/src/th.cc
index e8d5bbb49..a10dcb289 100644
--- a/Carpet/CarpetLib/src/th.cc
+++ b/Carpet/CarpetLib/src/th.cc
@@ -62,6 +62,21 @@ void th::regrid ()
+// Memory usage
+size_t
+th::
+memory ()
+ const
+{
+ return
+ memoryof (reffacts) +
+ memoryof (delta) +
+ memoryof (times) +
+ memoryof (deltas);
+}
+
+
+
// Output
void th::output (ostream& os) const
{