diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2020-09-11 10:59:28 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2020-09-11 11:00:03 +0200 |
commit | 2029188fd39bc4a8626d576049a62f5c8a9f2007 (patch) | |
tree | d26de65192da514fe0c19c6cde327170de40ff44 /vespalib | |
parent | f99747530354a544cad53de866620a5fd1876763 (diff) |
Correct allocated memory accounting for vespalib::string.
Diffstat (limited to 'vespalib')
-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(); |