getmempoolinfo
for now, but could be used for limiting the resource requirements too (#6281).
Implement accurate memory accounting for mempool #6410
pull sipa wants to merge 1 commits into bitcoin:master from sipa:mempoolusage changing 8 files +110 −2-
sipa commented at 6:37 pm on July 9, 2015: memberThis implements accurate memory usage accounting for the mempool. It is only exposed through
-
sipa force-pushed on Jul 9, 2015
-
sipa force-pushed on Jul 9, 2015
-
laanwj commented at 10:57 am on July 10, 2015: member
Tested ACK.
Nit: I’d slightly prefer
DynamicUsage
for eguint256
as helper functions outside the class instead of added members. -
laanwj added the label RPC on Jul 10, 2015
-
Implement accurate memory accounting for mempool 5098c47b24
-
sipa force-pushed on Jul 10, 2015
-
laanwj commented at 3:08 pm on July 10, 2015: memberOk, even better.
-
jonasschnelli commented at 9:48 am on July 11, 2015: contributorReview ACK. utACK (code is now running on bitcoin.jonasschnelli.ch) very minor nit: some ifs have opening brackets on the same line, some not. But i don’t care.
-
sipa commented at 10:44 am on July 11, 2015: memberRe code style: I’m aware, but I’m always following the style of the surroundig code.
-
jtimon commented at 11:36 am on July 11, 2015: contributor
utACK
Regarding style, I believe https://github.com/bitcoin/bitcoin/blob/master/src/.clang-format says always in the same line for if, else, for, switch and always in the next line for functions/methods (unless they are defined in one line, which is allowed). That’s what I’m doing when I need to touch the lines, but I have to admit I’m not 100% sure. Anyway, style nits…
-
laanwj merged this on Jul 11, 2015
-
laanwj closed this on Jul 11, 2015
-
laanwj referenced this in commit 7cdefb927e on Jul 11, 2015
-
jonasschnelli commented at 1:48 pm on July 11, 2015: contributorHere are also some stats done with a node running this PR: http://bitcoin.jonasschnelli.ch/charts/mempool/
-
petertodd commented at 1:58 pm on July 11, 2015: contributorutACK
-
in src/txmempool.h: in 5098c47b24
58@@ -58,6 +59,7 @@ class CTxMemPoolEntry 59 int64_t GetTime() const { return nTime; } 60 unsigned int GetHeight() const { return nHeight; } 61 bool WasClearAtEntry() const { return hadNoDependencies; } 62+ size_t DynamicMemoryUsage() const { return nUsageSize; }
morcos commented at 9:00 pm on July 13, 2015:Any reason we’re not counting the other member variables? Seems like there are another 53 bytes per CTMemPoolEntry?
sipa commented at 9:05 pm on July 13, 2015:Maybe it should have been called IndirectMemoryUsage. The size of the CTxMemPoolEntry structure itself is accounted for through memusage::DynamicUsage(mapTx), in which the entries are included. That allows for accurately taking alignment and malloc overhead into account.zkbot referenced this in commit 00e59e5935 on Mar 23, 2017random-zebra referenced this in commit 49867086da on Jun 3, 2020wqking referenced this in commit d1577afc9a on Jan 9, 2021MarcoFalke locked this on Sep 8, 2021
github-metadata-mirror
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-19 03:12 UTC
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-19 03:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me