MCPcopy Create free account
hub / github.com/OpenStickCommunity/GP2040-CE / getMemoryReport

Function getMemoryReport

src/webconfig.cpp:2423–2434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2421}
2422
2423std::string getMemoryReport()
2424{
2425 const size_t capacity = JSON_OBJECT_SIZE(10);
2426 DynamicJsonDocument doc(capacity);
2427 writeDoc(doc, "totalFlash", System::getTotalFlash());
2428 writeDoc(doc, "usedFlash", System::getUsedFlash());
2429 writeDoc(doc, "physicalFlash", Storage::getInstance().GetFlashSize());
2430 writeDoc(doc, "staticAllocs", System::getStaticAllocs());
2431 writeDoc(doc, "totalHeap", System::getTotalHeap());
2432 writeDoc(doc, "usedHeap", System::getUsedHeap());
2433 return serialize_json(doc);
2434}
2435
2436static bool _abortGetHeldPins = false;
2437

Callers

nothing calls this directly

Calls 3

writeDocFunction · 0.85
serialize_jsonFunction · 0.85
GetFlashSizeMethod · 0.80

Tested by

no test coverage detected