Better memory statistics.

This commit is contained in:
Matthias Koefferlein
2018-04-15 00:54:30 +02:00
parent d35c713c9c
commit e1922da3b2
39 changed files with 832 additions and 733 deletions
@@ -81,8 +81,13 @@ public:
const Sh &shape () const { return m_shape; }
size_t mem_used () const { return 0; }
size_t mem_reqd () const { return 0; }
virtual void mem_stat (db::MemStatistics *stat, db::MemStatistics::purpose_t purpose, int cat, bool no_self, void *parent) const
{
if (! no_self) {
stat->add (typeid (*this), (void *) this, sizeof (*this), sizeof (*this), parent, purpose, cat);
}
db::mem_stat (stat, purpose, cat, m_shape, true, (void *) this);
}
private:
Sh m_shape;