Add heap memory reporting for fonts and sections

Implements reportMemory() methods across SdCardFont, SdCardFontManager, and Section classes to track resident heap usage. Adds heap audit logging in EpubReaderActivity to attribute memory to fonts, framebuffer, section data, and other components for measurement-driven optimization.
This commit is contained in:
Justin Mitchell
2026-07-14 12:08:29 -04:00
parent 4d19d38152
commit ba92cb902e
7 changed files with 74 additions and 0 deletions
+3
View File
@@ -32,6 +32,9 @@ class SdCardFontManager {
// Get name of currently loaded family (empty if none).
const std::string& currentFamilyName() const { return loadedFamilyName_; };
// Sum of loaded fonts' resident heap (see SdCardFont::reportMemory).
size_t reportMemory() const;
// Point size that was actually loaded.
// 0 if nothing loaded.
uint8_t currentPointSize() const { return loadedPointSize_; };