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

Method DynamicMemoryUsage

src/txmempool.h:1027–1029  ·  view source on GitHub ↗

Estimate the overhead of queuedTx to be 6 pointers + an allocation, as no exact formula for boost::multi_index_contained is implemented.

Source from the content-addressed store, hash-verified

1025 // Estimate the overhead of queuedTx to be 6 pointers + an allocation, as
1026 // no exact formula for boost::multi_index_contained is implemented.
1027 size_t DynamicMemoryUsage() const {
1028 return memusage::MallocUsage(sizeof(CTransactionRef) + 6 * sizeof(void*)) * queuedTx.size() + cachedInnerUsage;
1029 }
1030
1031 void addTransaction(const CTransactionRef& tx)
1032 {

Callers

nothing calls this directly

Calls 2

MallocUsageFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected