mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Added missing "if (umm_heap == NULL) {..." to umm_free_heap_size_lw (#6929)
also called through xPortGetFreeHeapSize, umm_free_heap_size, ... Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
This commit is contained in:
parent
52d84b1ead
commit
30bfdad458
@ -162,6 +162,10 @@ UMM_STATISTICS ummStats;
|
|||||||
|
|
||||||
// Keep complete call path in IRAM
|
// Keep complete call path in IRAM
|
||||||
size_t umm_free_heap_size_lw( void ) {
|
size_t umm_free_heap_size_lw( void ) {
|
||||||
|
if (umm_heap == NULL) {
|
||||||
|
umm_init();
|
||||||
|
}
|
||||||
|
|
||||||
return (size_t)ummStats.free_blocks * sizeof(umm_block);
|
return (size_t)ummStats.free_blocks * sizeof(umm_block);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -211,5 +215,3 @@ int ICACHE_FLASH_ATTR umm_info_safe_printf_P(const char *fmt, ...) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // BUILD_UMM_MALLOC_C
|
#endif // BUILD_UMM_MALLOC_C
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user