summaryrefslogtreecommitdiff
path: root/src/nodes
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-07 19:32:46 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-07 19:32:46 +0300
commit03b8a1e6cf21dbcd3f6f03311cf02b91f3630c26 (patch)
treecb23fbbb4f716b6653091cdc14023a6c2f49b913 /src/nodes
parentdb6bbfe7d662460e5357f9d8fdbdd142cae3d8e1 (diff)
downloadparanucker-03b8a1e6cf21dbcd3f6f03311cf02b91f3630c26.tar.gz
paranucker-03b8a1e6cf21dbcd3f6f03311cf02b91f3630c26.tar.bz2
paranucker-03b8a1e6cf21dbcd3f6f03311cf02b91f3630c26.tar.xz
paranucker-03b8a1e6cf21dbcd3f6f03311cf02b91f3630c26.zip
Add memoryusage plugin command. It show only number of allocated nodes.
Diffstat (limited to 'src/nodes')
-rw-r--r--src/nodes/base/node.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nodes/base/node.h b/src/nodes/base/node.h
index 34688ef..d6b42ad 100644
--- a/src/nodes/base/node.h
+++ b/src/nodes/base/node.h
@@ -24,6 +24,8 @@
#include <string>
+extern int allocations;
+
struct Node
{
Node() :
@@ -40,6 +42,12 @@ struct Node
indent(0),
noLabel(false)
{
+ allocations ++;
+ }
+
+ ~Node()
+ {
+ allocations --;
}
std::string getIndent() const