@@ -725,6 +725,7 @@ tables_instantiate(AOTModuleInstance *module_inst, AOTModule *module,
725
725
#if WASM_ENABLE_GC != 0
726
726
table -> elem_ref_type .elem_ref_type = table_type -> elem_ref_type ;
727
727
#endif
728
+ table -> is_table64 = table_type -> flags & TABLE64_FLAG ;
728
729
729
730
#if WASM_ENABLE_MULTI_MODULE != 0
730
731
/* Set all elements to -1 or NULL_REF to mark them as uninitialized
@@ -788,6 +789,7 @@ tables_instantiate(AOTModuleInstance *module_inst, AOTModule *module,
788
789
#if WASM_ENABLE_GC != 0
789
790
table -> elem_ref_type .elem_ref_type = table_type -> elem_ref_type ;
790
791
#endif
792
+ table -> is_table64 = table_type -> flags & TABLE64_FLAG ;
791
793
792
794
/* Set all elements to -1 or NULL_REF to mark them as uninitialized
793
795
* elements */
@@ -951,15 +953,20 @@ memories_deinstantiate(AOTModuleInstance *module_inst)
951
953
952
954
memory_deinstantiate (memory );
953
955
954
- #if WASM_ENABLE_MULTI_MODULE == 0 && WASM_ENABLE_SHARED_MEMORY != 0
956
+ #if WASM_ENABLE_MULTI_MODULE == 0
957
+ #if WASM_ENABLE_SHARED_MEMORY != 0
955
958
/* for spawned only */
956
959
if (!shared_memory_is_shared (memory )) {
960
+ wasm_runtime_free (memory );
957
961
continue ;
958
962
}
959
963
960
964
if (shared_memory_get_reference (memory ) == 0 ) {
961
965
wasm_runtime_free (memory );
962
966
}
967
+ #else
968
+ wasm_runtime_free (memory );
969
+ #endif
963
970
#endif
964
971
}
965
972
@@ -1290,8 +1297,8 @@ memories_instantiate(const AOTModule *module, AOTModuleInstance *module_inst,
1290
1297
#endif
1291
1298
/*
1292
1299
*TODO:
1293
- * - either memories[x] points to an external AOTMemoryInstance.
1294
- * - or memories[x] points to an internal AOTMemoryInstance in
1300
+ * - either memories[x] points to an external WASM/ AOTMemoryInstance.
1301
+ * - or memories[x] points to an internal WASM/ AOTMemoryInstance in
1295
1302
* global_table_data
1296
1303
*
1297
1304
* the first case is simple for maintaining resource management
0 commit comments