Page 1 of 1

mpy issue in while loop

Posted: Mon Aug 03, 2020 1:05 pm
by jk3ger
Hello everybody.
I'm using frozen module for my project.
So I found problem which I don't know how to solve.

For example I use .mpy module from link https://docs.micropython.org/en/latest/ ... atmod.html
Everything works correctly when I run factorial method once
But when I use factorial method under while loop my board start rebooting.
I found problem it connects with heap fragmentation. So when .mpy method can't allocate memory in heap then board reboots.

What can I do to avoid such problem?

Re: mpy issue in while loop

Posted: Mon Aug 03, 2020 3:21 pm
by Roberthh
You may try tomorrow the most recent build of the firmware. Today Damien published a change that may affect what you noticed.
See: https://github.com/micropython/micropyt ... e211d7779c