HomePhabricator

Calculate memory usage correctly for unordered_maps that use PoolAllocator

Description

Calculate memory usage correctly for unordered_maps that use PoolAllocator

Summary:
Extracts the resource from a PoolAllocator and uses it for
calculation of the node's memory usage.

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

with an ARM fix and additional test to make sure the pool is actually used by the nodes from core#28913

Depends on D16175

Test Plan: ninja check

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Martin Leitner-Ankerl <martin.ankerl@gmail.com>Authored on Jun 11 2022, 07:28
PiRKCommitted on May 20 2024, 15:46
PiRKPushed on May 20 2024, 15:46
Reviewer
Restricted Project
Differential Revision
D16176: Calculate memory usage correctly for unordered_maps that use PoolAllocator
Parents
rABCf93eddc5bfa5: Add pool based memory resource & allocator
Branches
Unknown
Tags
Unknown