MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetMainMemoryUsage

Method GetMainMemoryUsage

src/txgraph.cpp:3548–3561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3546}
3547
3548size_t TxGraphImpl::GetMainMemoryUsage() noexcept
3549{
3550 // Make sure splits/merges are applied, as memory usage may not be representative otherwise.
3551 SplitAll(/*up_to_level=*/0);
3552 ApplyDependencies(/*level=*/0);
3553 // Compute memory usage
3554 size_t usage = /* From clusters */
3555 m_main_clusterset.m_cluster_usage +
3556 /* From Entry objects. */
3557 sizeof(Entry) * m_main_clusterset.m_txcount +
3558 /* From the chunk index. */
3559 memusage::DynamicUsage(m_main_chunkindex);
3560 return usage;
3561}
3562
3563} // namespace
3564

Callers 2

DynamicMemoryUsageMethod · 0.80
FUZZ_TARGETFunction · 0.80

Calls 1

DynamicUsageFunction · 0.85

Tested by 1

FUZZ_TARGETFunction · 0.64