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

Method DynamicMemoryUsage

src/dbwrapper.cpp:204–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204size_t CDBWrapper::DynamicMemoryUsage() const
205{
206 std::string memory;
207 std::optional<size_t> parsed;
208 if (!pdb->GetProperty("leveldb.approximate-memory-usage", &memory) || !(parsed = ToIntegral<size_t>(memory))) {
209 LogPrint(BCLog::LEVELDB, "Failed to get approximate-memory-usage property\n");
210 return 0;
211 }
212 return parsed.value();
213}
214
215// Prefixed with null character to avoid collisions with other keys
216//

Callers

nothing calls this directly

Calls 2

GetPropertyMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected