Wled_Fan_Controller/wled00/data
Damian Schneider 76cb2e9988
Improvements to heap-memory and PSRAM handling (#4791)
* Improved heap and PSRAM handling

- Segment `allocateData()` uses more elaborate DRAM checking to reduce fragmentation and allow for larger setups to run on low heap
- Segment data allocation fails if minimum contiguous block size runs low to keep the UI working
- Increased `MAX_SEGMENT_DATA` to account for better segment data handling
- Memory allocation functions try to keep enough DRAM for segment data
- Added constant `PSRAM_THRESHOLD` to improve PSARM usage
- Increase MIN_HEAP_SIZE to reduce risk of breaking UI due to low memory for JSON response
- ESP32 makes use of IRAM (no 8bit access) for pixeluffers, freeing up to 50kB of RAM
- Fix to properly get available heap on all platforms: added function `getFreeHeapSize()`
- Bugfix for effects that divide by SEGLEN: don't run FX in service() if segment is not active
-Syntax fix in AR: calloc() uses (numelements, size) as arguments

* Added new functions for allocation and heap checking

- added `allocate_buffer()` function that can be used to allocate large buffers: takes parameters to set preferred ram location, including 32bit accessible RAM on ESP32. Returns null if heap runs low or switches to PSRAM
- getFreeHeapSize() and getContiguousFreeHeap() helper functions for all platforms to correctly report free useable heap
- updated some constants
- updated segment data allocation to free the data if it is large

- replaced "psramsafe" variable with it's #ifdef: BOARD_HAS_PSRAM and made accomodating changes
- added some compile-time checks to handle invalid env. definitions
- updated all allocation functions and some of the logic behind them
- added use of fast RTC-Memory where available
- increased MIN_HEAP_SIZE for all systems (improved stability in tests)
- updated memory calculation in web-UI to account for required segment buffer
- added UI alerts if buffer allocation fails
- made getUsedSegmentData() non-private (used in buffer alloc function)
- changed MAX_SEGMENT_DATA
- added more detailed memory log to DEBUG output
- added debug output to buffer alloc function
2025-09-16 19:46:16 +02:00
..
cpal Added Distribute for cpal 2024-10-19 00:30:24 +05:30
icons-ui Add icon font 2022-03-28 23:23:38 +02:00
pixart Merge branch 'main' into 0_15 2024-02-06 14:47:20 +01:00
pxmagic Introduce common.js in settings pages 2024-09-17 16:26:11 +02:00
404.htm Missing WS connection fallback for liveview (#3267) 2023-06-27 01:51:24 +02:00
common.js Tweaks in OTA UI 2025-06-26 11:41:03 +02:00
dmxmap.htm
edit.htm
favicon.ico
index.css Segment layering & effect blending improvements 2025-04-22 22:37:18 +02:00
index.htm More OTA UI tweaks 2025-06-26 15:46:23 +02:00
index.js Merge pull request #4748 from wled/aOTA 2025-08-02 23:11:37 +02:00
iro.js
liveview.htm Width fix 2024-01-11 20:37:51 +01:00
liveviewws2D.htm Merge branch 'main' into 0_15 2024-02-06 14:47:20 +01:00
msg.htm Reverse proxy support. 2023-06-04 18:40:29 +02:00
rangetouch.js
settings_2D.htm Fix 2D matrix generator preview update issue 2025-09-03 17:51:00 +00:00
settings_dmx.htm update links to point to the new repo 2025-02-15 20:07:41 +01:00
settings_leds.htm Improvements to heap-memory and PSRAM handling (#4791) 2025-09-16 19:46:16 +02:00
settings_pin.htm removed onkeydown tried to find a replacement for the nbsp 2024-10-18 18:43:41 +02:00
settings_sec.htm Make version information consistent across update interfaces 2025-08-17 22:45:20 +02:00
settings_sync.htm Fix missing hideDMXInput and hideNoDMXInput functions 2025-01-22 20:33:15 +00:00
settings_time.htm Allow clock overlay to use LED beyond 255 2025-03-29 23:39:47 +01:00
settings_ui.htm Introduce common.js in settings pages 2024-09-17 16:26:11 +02:00
settings_um.htm settings_um: Use live config 2025-03-23 15:20:16 -04:00
settings_wifi.htm Delete the same define 2025-09-01 11:05:31 +08:00
settings.htm Introduce common.js in settings pages 2024-09-17 16:26:11 +02:00
style.css Add mDNS resolution for network bus 2025-07-12 18:44:38 +02:00
update.htm Make version information consistent across update interfaces 2025-08-17 22:45:20 +02:00
usermod.htm
welcome.htm Missing WS connection fallback for liveview (#3267) 2023-06-27 01:51:24 +02:00