Mininal Port's Garbage Collection
Posted: Wed Nov 27, 2019 7:33 pm
Hi, I have some problems with minimal port's gc_collect function.
First of all, I have been developing some code for the Micropython's minimal port in order to execute it in a stm32. Some of this code needs to run the gc_collect() function to avoid garbage to accumulate and occupy all my heap, leaving my board without any heap left and ending it's execution.
When I execute my code in a stm32 everything works fine, the heap is not fully occupied and the board is able to work indefinitely without running out of heap. However, when I compile the LINUX version of the Minimal port and run it, the gc_collect() generates a 'core dumped' exception.
I deduce that this function needs to be implemented, as it seems that it has to be adapted to every port.
Any ideas on how could I implement it or, maybe, make this function work in stm32 and LINUX?
Thank you.
First of all, I have been developing some code for the Micropython's minimal port in order to execute it in a stm32. Some of this code needs to run the gc_collect() function to avoid garbage to accumulate and occupy all my heap, leaving my board without any heap left and ending it's execution.
When I execute my code in a stm32 everything works fine, the heap is not fully occupied and the board is able to work indefinitely without running out of heap. However, when I compile the LINUX version of the Minimal port and run it, the gc_collect() generates a 'core dumped' exception.
I deduce that this function needs to be implemented, as it seems that it has to be adapted to every port.
Any ideas on how could I implement it or, maybe, make this function work in stm32 and LINUX?
Thank you.