Skip to content

Memory allocation remains after an exchange with the REPL via the serial port. #10718

@jczic

Description

@jczic

Hi, there is something strange about the memory reservation through the REPL via UART.

  • MicroPython v1.19.1 on 2022-06-18
  • ESP32C3 module
  • IDF v4.4.1 with new lib 3.3.0

To reproduce my problem, you just have to connect serially to the REPL, copy/paste a lot of characters (either in the normal prompt, in RAW mode or copy/paste mode), for example a size of 15000, and then look at the memory allocated afterwards via gc.mem_alloc().

These characters seem to remain somewhere, even after a gc.collect().
Sometimes disconnecting the serial port and then reconnecting it empties this memory reservation, but more often than not, it remains and cannot be freed.
Also, a call to micropython.mem_info(1) show a real difference.

Is this a problem on my part or on the side of Micropython or IDF?
Maybe related to the logic of fragmentation blocks... I have no idea where this comes from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions