← index #4518Issue #16144
Off-topic · high · value 5.303
QUERY · ISSUE

memory allocation error from time to time after machine.reset()

openby nedoskivopened 2019-02-18updated 2024-09-19
needs-info

Hello,
I'm using ESP32 with MicroPython v1.9.4-684-g51482ba92 without PSRAM

I got lot of stuff some _threads, while writing and changing I often restart the board, using machine.reset()

from time to time i got memory allocation error when my scripts start to load. So question is why, board reboot if some of them are too big it should fail every time. Not from time to time. Is there something that I'm missing?

CANDIDATE · ISSUE

Wrong message on malloc fail

openby Tangerinoopened 2024-11-03updated 2026-03-24
bugport-esp32needs-info

Port, board and/or hardware

esp32

MicroPython version

MemoryError: memory allocation failed, allocating %u bytes
MicroPython v1.24.0 on 2024-10-25; Generic ESP32 module with ESP32

Reproduction

Allocated a big list

Expected behaviour

Fail with the right message

Observed behaviour

MemoryError: memory allocation failed, allocating %u bytes
MicroPython v1.24.0 on 2024-10-25; Generic ESP32 module with ESP32

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied