diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-07 19:32:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-07 19:32:46 +0300 |
commit | 03b8a1e6cf21dbcd3f6f03311cf02b91f3630c26 (patch) | |
tree | cb23fbbb4f716b6653091cdc14023a6c2f49b913 /src/nodes | |
parent | db6bbfe7d662460e5357f9d8fdbdd142cae3d8e1 (diff) | |
download | paranucker-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.h | 8 |
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 |