diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-07-26 22:20:19 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-07-26 22:20:19 +1000 |
| commit | eefe26b48b0155b2634837d3aff2e9b84079ea1a (patch) | |
| tree | e883841c1ddd86743552b4a899690b7ff6e13fc8 /src/shared_string.cc | |
| parent | 7cf3cbde8ea078ad1620eafcf919386ea03b10d5 (diff) | |
Fix shared string registry ref count stats
Diffstat (limited to 'src/shared_string.cc')
| -rw-r--r-- | src/shared_string.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared_string.cc b/src/shared_string.cc index 73f2b69d..d76e0ac3 100644 --- a/src/shared_string.cc +++ b/src/shared_string.cc @@ -49,7 +49,7 @@ void StringData::Registry::debug_stats() const size_t count = m_strings.size(); for (auto& st : m_strings) { - total_refcount += st.value->refcount - 1; + total_refcount += (st.value->refcount & refcount_mask) - 1; total_size += (int)st.value->length; } write_to_debug_buffer(format(" data size: {}, mean: {}", total_size, (float)total_size/count)); |
