mpy issue in while loop
Posted: Mon Aug 03, 2020 1:05 pm
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?
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?