Skip to content

Conversation

@sensenmann
Copy link
Owner

Motivation

  • Ensure PSRAM memory reporting uses the ESP-IDF SPIRAM-aware heap APIs and reports accurate values.
  • Provide a clear placeholder when PSRAM is not available instead of producing misleading numbers.
  • Keep the displayed label consistent as PSRAM in both inline and detailed free-memory outputs.

Description

  • In src/EZLog.cpp update _addFreeMemToMessage() to detect PSRAM with heap_caps_get_total_size(MALLOC_CAP_SPIRAM) and read free size via heap_caps_get_free_size(MALLOC_CAP_SPIRAM).
  • In _freeMem() switch PSRAM calculations to use heap_caps_get_free_size and heap_caps_get_largest_free_block for MALLOC_CAP_SPIRAM and conditionally format output based on availability.
  • Display PSRAM n/a when no PSRAM is present and keep the PSRAM label consistent in the inline memory summary.
  • When PSRAM is absent, set lastMemoryUsagePSRam to zero to avoid spurious delta values.

Testing

  • No automated tests were run.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants