aboutsummaryrefslogtreecommitdiff
path: root/src/script/script.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-07-09 13:56:31 -0400
committerPieter Wuille <pieter.wuille@gmail.com>2015-07-10 10:49:31 -0400
commit5098c47b2430ded299c21620527ebd0544fe51e2 (patch)
tree5423630dea9653802744ed2bb997797fc1b6ca96 /src/script/script.cpp
parent943b322d5d292707e193f3a9d8e971881540be23 (diff)
Implement accurate memory accounting for mempool
Diffstat (limited to 'src/script/script.cpp')
-rw-r--r--src/script/script.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/script.cpp b/src/script/script.cpp
index fd33924732..b1d2ceeb9f 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -260,3 +260,8 @@ std::string CScript::ToString() const
}
return str;
}
+
+size_t CScript::DynamicMemoryUsage() const
+{
+ return memusage::DynamicUsage(*(static_cast<const std::vector<unsigned char>*>(this)));
+}