Actually running process.memory() is a perfectly fine workaround. The issue seems to be when the free list is out of order but no memory is collected by GC. The GC pass returns 0 so Espruino thinks nothing happened (even though the free list is reordered), and never bothers trying to reallocate again.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Issue filed here: https://github.com/espruino/Espruino/issues/1559
Actually running
process.memory()
is a perfectly fine workaround. The issue seems to be when the free list is out of order but no memory is collected by GC. The GC pass returns 0 so Espruino thinks nothing happened (even though the free list is reordered), and never bothers trying to reallocate again.It should be easy enough to fix.