esp32/main: Store native code as linked list instead of list on GC heap.
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: Damien George <damien@micropython.org>
Showing
Please register or sign in to comment