MCPcopy Create free account
hub / github.com/ElementsProject/elements / DynamicMemoryUsage

Method DynamicMemoryUsage

src/txmempool.cpp:1136–1140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1134}
1135
1136size_t CTxMemPool::DynamicMemoryUsage() const {
1137 LOCK(cs);
1138 // Estimate the overhead of mapTx to be 15 pointers + an allocation, as no exact formula for boost::multi_index_contained is implemented.
1139 return memusage::MallocUsage(sizeof(CTxMemPoolEntry) + 15 * sizeof(void*)) * mapTx.size() + memusage::DynamicUsage(mapNextTx) + memusage::DynamicUsage(mapDeltas) + memusage::DynamicUsage(vTxHashes) + cachedInnerUsage;
1140}
1141
1142void CTxMemPool::RemoveUnbroadcastTx(const uint256& txid, const bool unchecked) {
1143 LOCK(cs);

Callers 3

addUncheckedMethod · 0.45
removeUncheckedMethod · 0.45
checkMethod · 0.45

Calls 3

MallocUsageFunction · 0.85
DynamicUsageFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected