summaryrefslogtreecommitdiffstatshomepage
path: root/py/persistentcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/persistentcode.c')
-rw-r--r--py/persistentcode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/persistentcode.c b/py/persistentcode.c
index fbef0b2c0f..a8e7429550 100644
--- a/py/persistentcode.c
+++ b/py/persistentcode.c
@@ -644,3 +644,8 @@ void mp_raw_code_save_file(mp_compiled_module_t *cm, const char *filename) {
#endif // MICROPY_PERSISTENT_CODE_SAVE_FILE
#endif // MICROPY_PERSISTENT_CODE_SAVE
+
+#if MICROPY_PERSISTENT_CODE_TRACK_RELOC_CODE
+// An mp_obj_list_t that tracks relocated native code to prevent the GC from reclaiming them.
+MP_REGISTER_ROOT_POINTER(mp_obj_t track_reloc_code_list);
+#endif