chore: Add 'memory arena show' command (#3298)

* chore: Add 'memory arena show' command

Its output goes to stdout.
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-07-10 10:20:17 +03:00 committed by GitHub
parent 5d4b969bee
commit b61c722f84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 9 deletions

View file

@ -181,7 +181,7 @@ void Transaction::InitGlobal() {
void Transaction::BuildShardIndex(const KeyIndex& key_index, std::vector<PerShardCache>* out) {
auto& shard_index = *out;
auto add = [this, &shard_index](uint32_t sid, uint32_t b, uint32_t e) {
auto add = [&shard_index](uint32_t sid, uint32_t b, uint32_t e) {
auto& slices = shard_index[sid].slices;
if (!slices.empty() && slices.back().second == b) {
slices.back().second = e;