This introduces a C++ allocator class (memusage::AccountingAllocator) which enables containers that accurately account for all their memory allocations in a tracker variable.
This is then used to replace the heuristics in the mempool to guess memory usage.
test: Make `mempool_tests/MempoolSizeLimitTest` allocation-neutral90e4fc7faf
hebasto added the label
Mempool
on Nov 30, 2022
hebasto added the label
Resource usage
on Nov 30, 2022
DrahtBot
commented at 10:49 pm on November 30, 2022:
contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process.
A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
#25325 (Add pool based memory resource by martinus)
#19909 (refactor: Remove unused CTxMemPool::clear() helper by MarcoFalke)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
hebasto force-pushed
on Nov 30, 2022
hebasto force-pushed
on Dec 1, 2022
Add `AccountingAllocator` to help with memusage tracking
hebasto marked this as ready for review
on Dec 1, 2022
fanquake
commented at 10:55 am on December 20, 2022:
member
It would be good for the PR description to outline:
What is currently wrong with our memory accounting?
How inaccurate is it?
How (much more) accurate is it after this change?
Is the accuracy affected by things like standard library (version), compiler used etc.
How does someone reviewing this PR check the accounted memory usage, before and after?
Maybe the above is all completely obvious from the changes, but I think a PR like this would benefit from having a PR description that isn’t just copy-paste from the original 2-year-old PR. Especially since this PR is also missing all the discussion/questions that happened in the original PR (anything relevant could be recapped in the description here).
DrahtBot added the label
Needs rebase
on Jan 4, 2023
DrahtBot
commented at 8:52 am on January 4, 2023:
contributor
🐙 This pull request conflicts with the target branch and needs rebase.
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-12-03 15:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me