diff options
Diffstat (limited to 'esp8266/gccollect.c')
-rw-r--r-- | esp8266/gccollect.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/esp8266/gccollect.c b/esp8266/gccollect.c index 3a5032bc93..1b9349f574 100644 --- a/esp8266/gccollect.c +++ b/esp8266/gccollect.c @@ -46,6 +46,11 @@ void gc_collect(void) { // trace the stack, including the registers (since they live on the stack in this function) gc_collect_root((void**)sp, (STACK_END - sp) / sizeof(uint32_t)); + #if MICROPY_EMIT_XTENSA || MICROPY_EMIT_INLINE_XTENSA + // trace any native code because it can contain pointers to the heap + esp_native_code_gc_collect(); + #endif + // end the GC gc_collect_end(); } |