diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-09-11 11:37:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-11 11:37:38 +0200 |
commit | 0f843241edae8d31ea982e3e62b34d9367e28637 (patch) | |
tree | 044cb2ac0d2be68565da5622f26de7a1be566570 | |
parent | 6ba482ddc41bfaa9b34ae66b641bcdf452c86792 (diff) | |
parent | 2029188fd39bc4a8626d576049a62f5c8a9f2007 (diff) |
Merge pull request #14377 from vespa-engine/toregge/correct-allocated-memory-accounting
Correct allocated memory accounting for vespalib::string.
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/string.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/stllike/string.h b/vespalib/src/vespa/vespalib/stllike/string.h index 121a243d403..d85a01b8d52 100644 --- a/vespalib/src/vespa/vespalib/stllike/string.h +++ b/vespalib/src/vespa/vespalib/stllike/string.h @@ -530,7 +530,7 @@ public: } size_t count_allocated_memory() const { - return sizeof(small_string) + isAllocated() ? _bufferSize : 0; + return sizeof(small_string) + (isAllocated() ? _bufferSize : 0); } size_t count_used_memory() const { return sizeof(small_string) - StackSize + size(); |