diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-12-17 23:40:18 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-01-10 22:35:28 +0000 |
commit | dfd9a1b244725de2f594053cdb11c7ef0f3cb9ae (patch) | |
tree | ad22e0e180410289f38b92daa251786aa36fd6d5 /vespalib/src/vespa/vespalib/datastore/datastore.hpp | |
parent | 00d005ea8544ee5677c2f18d5358cf65afebbf32 (diff) |
The bufferstate vector normally has 8k elements. Since the BufferState was 160 bytes this is aroung 1.2M.
This reduces the BufferState to 128 making it fit nicely in a 1M allocation.
However the cost is that you get an extra small allocation for the _freeList. We should see if we could reclain that by further reducing the size of the BufferState.
Perhaps the element count will be sufficient with uint32_t.
Diffstat (limited to 'vespalib/src/vespa/vespalib/datastore/datastore.hpp')
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/datastore.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/datastore/datastore.hpp b/vespalib/src/vespa/vespalib/datastore/datastore.hpp index f4e37804317..42146eab9aa 100644 --- a/vespalib/src/vespa/vespalib/datastore/datastore.hpp +++ b/vespalib/src/vespa/vespalib/datastore/datastore.hpp @@ -29,7 +29,7 @@ DataStoreT<RefT>::freeElem(EntryRef ref, size_t numElems) BufferState &state = getBufferState(intRef.bufferId()); if (state.isActive()) { if (state.freeListList() != nullptr && numElems == state.getArraySize()) { - if (state.freeList().empty()) { + if (state.isFreeListEmpty()) { state.addToFreeListList(); } state.freeList().push_back(ref); |