Fix shared string registry ref count stats

This commit is contained in:
Maxime Coste 2018-07-26 22:20:19 +10:00
parent 7cf3cbde8e
commit eefe26b48b

View File

@ -49,7 +49,7 @@ void StringData::Registry::debug_stats() const
size_t count = m_strings.size(); size_t count = m_strings.size();
for (auto& st : m_strings) 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; total_size += (int)st.value->length;
} }
write_to_debug_buffer(format(" data size: {}, mean: {}", total_size, (float)total_size/count)); write_to_debug_buffer(format(" data size: {}, mean: {}", total_size, (float)total_size/count));