Ensure xPortGetFreeHeapSize reports DRAM by mhightower83 · Pull Request #8680 · esp8266/Arduino
Create dedicated function for `xPortGetFreeHeapSize()` that only reports on DRAM. Update and export `umm_free_heap_size()` to report the free Heap space of the current Heap. Updated ESP.getFreeHeap() to use. Replace internal function `umm_free_heap_size_lw()` with `umm_free_heap_size()`. See umm_malloc/Notes.h entry Sep 26, 2022 for more specifics. uncrustified `umm_poison.c`
added 2 commits
September 29, 2022 10:56
mcspr
added this to the
3.1 milestone
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request
Nov 18, 2024Create dedicated function for xPortGetFreeHeapSize() that only reports on DRAM. NONOS SDK API system_get_free_heap_size() relies on xPortGetFreeHeapSize() for the free Heap size. Possible breaking change for multiple Heap Sketches calling system_get_free_heap_size(); it will now always report free DRAM Heap size. Update and export umm_free_heap_size_lw() to report the free Heap size of the current Heap. Updated ESP.getFreeHeap() to use umm_free_heap_size_lw(). Updated build options to supply exported umm_free_heap_size_lw() via either UMM_STATS or UMM_INFO. Improved build option support via the SketchName.ino.globals.h method for Heap options: UMM_INFO, UMM_INLINE_METRICS, UMM_STATS, UMM_STATS_FULL, UMM_BEST_FIT, and UMM_FIRST_FIT. While uncommon to change from the defaults, you can review umm_malloc_cfgport.h for more details, which may help reduce your Sketch's size in dire situations. Assuming you are willing to give up some functionality. For debugging UMM_STATS_FULL can offer additional stats, like Heap low water mark (umm_free_heap_size_min()).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters