Hello,
First I want to say sorry about posting kind of issue since they are hard to reproduce.
Here is the situation, I got few threads started, in one is web server in another adc monitor, in third is remote logger. from time to time I got error:
MemoryError: memory allocation failed, allocating 1821 bytes
while trying to fix that i place some free heap monitoring and there is a lot of heap, but it still fails with memoty allocation error.
I also place gc_collect() in many places, it improves situation a bit, but it still fails with same error.
Increased _thead stack size, no effect.
How is the things working with threads, why fail to allocate memory since there is a lot? Is there a way to reserve some memory for a thread?
(sysname='esp32', nodename='esp32', release='1.10.0', version='v1.10-380-g6cf4e9675 on 2019-05-23', machine='ESP32 module with ESP32')
P.S.
problem was occured when I use this binary:
esp32-20190523-v1.10-380-g6cf4e9675.zip
Using it cause free heap in my case to vary between 77K to 30K and sometime fail with memory allocation error, decided to switch back to 1.10 and my device is working from few hours at maximum load without problem,. Free heap is stable around 70kb
Hello,
First I want to say sorry about posting kind of issue since they are hard to reproduce.
Here is the situation, I got few threads started, in one is web server in another adc monitor, in third is remote logger. from time to time I got error:
MemoryError: memory allocation failed, allocating 1821 bytes
while trying to fix that i place some free heap monitoring and there is a lot of heap, but it still fails with memoty allocation error.
I also place gc_collect() in many places, it improves situation a bit, but it still fails with same error.
Increased _thead stack size, no effect.
How is the things working with threads, why fail to allocate memory since there is a lot? Is there a way to reserve some memory for a thread?
(sysname='esp32', nodename='esp32', release='1.10.0', version='v1.10-380-g6cf4e9675 on 2019-05-23', machine='ESP32 module with ESP32')
P.S.
problem was occured when I use this binary:
esp32-20190523-v1.10-380-g6cf4e9675.zip
Using it cause free heap in my case to vary between 77K to 30K and sometime fail with memory allocation error, decided to switch back to 1.10 and my device is working from few hours at maximum load without problem,. Free heap is stable around 70kb