mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
Merge branch 'bugfix/resolve_watchdog_crash_v5.4' into 'release/v5.4'
fix(nimble): Resolved watchdog due to memory exceed prints (v5.4) See merge request espressif/esp-idf!35209
This commit is contained in:
commit
5af12cf722
@ -1 +1 @@
|
||||
Subproject commit da900069fb087c5f4e2da54a39490e3c4a59d159
|
||||
Subproject commit fd287cbafebebbdb136bbfd7ebba8a8ceefef55b
|
@ -10,6 +10,7 @@
|
||||
#include "esp_log.h"
|
||||
#include <assert.h>
|
||||
|
||||
static uint8_t log_count;
|
||||
IRAM_ATTR void *bt_osi_mem_malloc(size_t size)
|
||||
{
|
||||
void *mem = NULL;
|
||||
@ -22,8 +23,12 @@ IRAM_ATTR void *bt_osi_mem_malloc(size_t size)
|
||||
#else
|
||||
mem = malloc(size);
|
||||
#endif
|
||||
if(!mem){
|
||||
ESP_LOGI("ESP_LOG_INFO","malloc failed (size %zu)",size);
|
||||
if (!mem) {
|
||||
log_count ++;
|
||||
if ((log_count % 40) == 0) {
|
||||
esp_rom_printf("malloc failed (size %zu)",size);
|
||||
log_count = 0;
|
||||
}
|
||||
assert(mem != NULL);
|
||||
}
|
||||
return mem;
|
||||
|
Loading…
x
Reference in New Issue
Block a user