Parcourir la source

aot data struct modification

TL il y a 1 an
Parent
commit
948d981a5c
2 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 2 0
      core/iwasm/aot/aot_runtime.c
  2. 2 3
      core/iwasm/aot/aot_runtime.h

+ 2 - 0
core/iwasm/aot/aot_runtime.c

@@ -60,6 +60,8 @@ bh_static_assert(offsetof(AOTModuleInstanceExtra, stack_sizes) == 0);
 bh_static_assert(offsetof(AOTModuleInstanceExtra, shared_heap_base_addr_adj)
 bh_static_assert(offsetof(AOTModuleInstanceExtra, shared_heap_base_addr_adj)
                  == 8);
                  == 8);
 bh_static_assert(offsetof(AOTModuleInstanceExtra, shared_heap_start_off) == 16);
 bh_static_assert(offsetof(AOTModuleInstanceExtra, shared_heap_start_off) == 16);
+bh_static_assert(offsetof(AOTModuleInstanceExtra, shared_heap_end_off) == 24);
+bh_static_assert(offsetof(AOTModuleInstanceExtra, shared_heap) == 32);
 
 
 bh_static_assert(sizeof(CApiFuncImport) == sizeof(uintptr_t) * 3);
 bh_static_assert(sizeof(CApiFuncImport) == sizeof(uintptr_t) * 3);
 
 

+ 2 - 3
core/iwasm/aot/aot_runtime.h

@@ -125,6 +125,8 @@ typedef struct AOTModuleInstanceExtra {
      */
      */
     DefPointer(uint8 *, shared_heap_base_addr_adj);
     DefPointer(uint8 *, shared_heap_base_addr_adj);
     MemBound shared_heap_start_off;
     MemBound shared_heap_start_off;
+    MemBound shared_heap_end_off;
+    DefPointer(WASMSharedHeap *, shared_heap);
 
 
     WASMModuleInstanceExtraCommon common;
     WASMModuleInstanceExtraCommon common;
 
 
@@ -142,9 +144,6 @@ typedef struct AOTModuleInstanceExtra {
     WASMModuleInstanceCommon **import_func_module_insts;
     WASMModuleInstanceCommon **import_func_module_insts;
 #endif
 #endif
 
 
-#if WASM_ENABLE_SHARED_HEAP != 0
-    WASMSharedHeap *shared_heap;
-#endif
 } AOTModuleInstanceExtra;
 } AOTModuleInstanceExtra;
 
 
 #if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64)
 #if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64)