I have an application that allocates lots of mid that were below SPIRAM threshold SPIRAM_MALLOC_ALWAYSINTERNAL. The Wifi driver was failing regularly its memory alloc (and then disconnecting) and I realized that it was happening once the internal memory was consumed by my other applications. Moving SPIRAM_MALLOC_ALWAYSINTERNAL to 2048, which is way below most of my application blocks, the problem went away.
1/ reading the the doc, the WiFi alloc shall not fail, but shall try SPIRAM then
2/ I've set the NEW option to allocate WiFI to SPIRAM first and then fallback to internal and it does not seem to work
I Have the 64MBits SPIRAM, with 1.7MB available
WiFi cannot allocate memory in SPIRAM when ISRAM is full
-
- Posts: 26
- Joined: Thu May 23, 2019 3:05 pm
-
- Posts: 57
- Joined: Thu Mar 01, 2018 1:26 am
Re: WiFi cannot allocate memory in SPIRAM when ISRAM is full
I have the same issue. As soon as I enable the option for Wifi and LWIP stack to allocate from PSRAM, weird things such as WiFi not connecting starts happening. Were you ever able to figure this out?
-
- Posts: 26
- Joined: Thu May 23, 2019 3:05 pm
Re: WiFi cannot allocate memory in SPIRAM when ISRAM is full
Yes, I had to lower the minimum block size that was *always* allocated to internal RAM (CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL) so that my application would not allocate too much of the internal ram as WiFi *wants* some of its allocation to be in internal ram, regardless of WiFi memory allocation strategy settings
Who is online
Users browsing this forum: No registered users and 24 guests