• Damien George's avatar
    esp32/main: Store native code as linked list instead of list on GC heap. · 5ff6c12c
    Damien George authored
    Finalisers that run during `gc_sweep_all()` may run native code, for
    example if an open file is closed and the underlying block device is
    implemented in native code, then the filesystem driver (eg FAT) may call
    into the native code.
    
    Therefore, native code must be freed after the call to `gc_sweep_all()`.
    That can only be achieved if the GC heap is not used to store the list of
    allocated native code blocks.  Instead, this commit makes the native code
    blocks a linked list.
    Signed-off-by: default avatarDamien George <damien@micropython.org>
    5ff6c12c
main.c 7.23 KB