Skip to content

v2.0.3 - PSRAM Memory Allocation

Choose a tag to compare

@eleonel eleonel released this 24 Jan 23:24

v2.0.3 - PSRAM Memory Allocation

Highlights

JavaScript apps now have 256KB of heap memory (up from 96KB) by utilizing the ESP32-S3's PSRAM.

Changes

Memory Improvements

  • Elk JavaScript heap moved from regular RAM to PSRAM (8MB available)
  • Heap size increased from 96KB to 256KB (2.7× larger)
  • Automatic fallback to 96KB regular RAM if PSRAM unavailable
  • Complex apps with multiple styles and labels now run without memory crashes

Technical Details

  • elk_memory now dynamically allocated via ps_malloc()
  • Added init_elk_memory() for PSRAM initialization with fallback
  • Boot message shows allocation: Elk heap allocated in PSRAM: 256 KB

Compatibility

  • Fully backward compatible with existing scripts
  • No changes required to JavaScript apps

Full Changelog: 2.0.2...2.0.3