HomePhabricator

Call ReallocateCache() on each Flush()

Description

Call ReallocateCache() on each Flush()

Summary:
This frees up all associated memory with the map, not only the nodes.
This is necessary in preparation for using the PoolAllocator for
CCoinsMap, which does not actually free any memory on clear().

This is a partial backport of core#25325
https://github.com/bitcoin/bitcoin/pull/25325/commits/5e4ac5abf54f8e6d6330df0c73119aa0cca4c103

Depends on D16176

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D16177

Details

Provenance
Martin Leitner-Ankerl <martin.ankerl@gmail.com>Authored on Jun 11 2022, 09:00
PiRKCommitted on May 20 2024, 15:46
PiRKPushed on May 20 2024, 15:46
Reviewer
Restricted Project
Differential Revision
D16177: Call ReallocateCache() on each Flush()
Parents
rABC574f749bd839: Calculate memory usage correctly for unordered_maps that use PoolAllocator
Branches
Unknown
Tags
Unknown

Event Timeline