aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/net.cpp b/src/net.cpp
index d76b39f75d..3e936b5f3d 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -121,10 +121,7 @@ std::string strSubVersion;
size_t CSerializedNetMsg::GetMemoryUsage() const noexcept
{
- // Don't count the dynamic memory used for the m_type string, by assuming it fits in the
- // "small string" optimization area (which stores data inside the object itself, up to some
- // size; 15 bytes in modern libstdc++).
- return sizeof(*this) + memusage::DynamicUsage(data);
+ return sizeof(*this) + memusage::DynamicUsage(m_type) + memusage::DynamicUsage(data);
}
void CConnman::AddAddrFetch(const std::string& strDest)