MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / DynamicMemoryUsage

Method DynamicMemoryUsage

src/txmempool.cpp:861–865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

859}
860
861size_t CTxMemPool::DynamicMemoryUsage() const {
862 LOCK(cs);
863 // Estimate the overhead of mapTx to be 12 pointers + an allocation, as no exact formula for boost::multi_index_contained is implemented.
864 return memusage::MallocUsage(sizeof(CTxMemPoolEntry) + 12 * sizeof(void*)) * mapTx.size() + memusage::DynamicUsage(mapNextTx) + memusage::DynamicUsage(mapDeltas) + memusage::DynamicUsage(mapLinks) + cachedInnerUsage;
865}
866
867void CTxMemPool::RemoveStaged(setEntries &stage, bool updateDescendants) {
868 AssertLockHeld(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