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:
@@ -32,6 +32,9 @@ class SdCardFontSystem {
|
||||
/// Non-const access to the registry (for FontInstaller).
|
||||
SdCardFontRegistry& registry() { return registry_; }
|
||||
|
||||
/// Resident heap held by loaded SD fonts (audit; see SdCardFont::reportMemory).
|
||||
size_t reportFontMemory() const { return manager_.reportMemory(); }
|
||||
|
||||
/// Mark the registry as needing re-discovery.
|
||||
/// Thread-safe: can be called from the web server task.
|
||||
void markRegistryDirty() { registryDirty_.store(true, std::memory_order_release); }
|
||||
|
||||
Reference in New Issue
Block a user