| 3546 | } |
| 3547 | |
| 3548 | size_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 | |