HomePhabricator

cuckoocache: Return approximate memory size

Description

cuckoocache: Return approximate memory size

Summary:
Returning the approximate total size eliminates the need for
InitS*Cache() to do nElems*sizeof(uint256). The cuckoocache has a better
idea of this information.

This is a partial backport of core#25527
https://github.com/bitcoin/bitcoin/pull/25527/commits/08dbc6ef72db48168dc03991f5f838dae42c8dfd

Depends on D15734

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Jul 1 2022, 03:10
PiRKCommitted on Mar 19 2024, 16:21
PiRKPushed on Mar 19 2024, 16:21
Reviewer
Restricted Project
Differential Revision
D15735: cuckoocache: Return approximate memory size
Parents
rABC06fe55382386: tests: Reduce calls to InitS*Cache()
Branches
Unknown
Tags
Unknown