Saturday, 6 November 2021

Is there a memory leak in MicroPython hex function

I have written a small MicroPython program for raspberry PI Pico.

This program creates a thread which increments a counter and prints the value in hex.

import _thread

def myThread():
    count = 0
    while True:
        count = count + 1
        print(hex(count))

_thread.start_new_thread(myThread, ())

This program always fails at 0x16ea.

If I do not use the hex function the code works fine.

A bit of digging using micropython.mem_info() and it looks like the hex function has a memory leak. Or am I doing something wrong?



from Is there a memory leak in MicroPython hex function

No comments:

Post a Comment