@@ -60,6 +60,16 @@ bh_static_assert(offsetof(AOTModuleInstanceExtra, stack_sizes) == 0);
6060bh_static_assert (offsetof(AOTModuleInstanceExtra , shared_heap_base_addr_adj )
6161 == 8 );
6262bh_static_assert (offsetof(AOTModuleInstanceExtra , shared_heap_start_off ) == 16 );
63+ bh_static_assert (offsetof(AOTModuleInstanceExtra , shared_heap_end_off ) == 24 );
64+ bh_static_assert (offsetof(AOTModuleInstanceExtra , shared_heap ) == 32 );
65+
66+ bh_static_assert (offsetof(WASMSharedHeap , next ) == 0 );
67+ bh_static_assert (offsetof(WASMSharedHeap , chain_next ) == 8 );
68+ bh_static_assert (offsetof(WASMSharedHeap , heap_handle ) == 16 );
69+ bh_static_assert (offsetof(WASMSharedHeap , base_addr ) == 24 );
70+ bh_static_assert (offsetof(WASMSharedHeap , size ) == 32 );
71+ bh_static_assert (offsetof(WASMSharedHeap , start_off_mem64 ) == 40 );
72+ bh_static_assert (offsetof(WASMSharedHeap , start_off_mem32 ) == 48 );
6373
6474bh_static_assert (sizeof (CApiFuncImport ) == sizeof (uintptr_t ) * 3 );
6575
@@ -2090,6 +2100,8 @@ aot_instantiate(AOTModule *module, AOTModuleInstance *parent,
20902100#else
20912101 extra -> shared_heap_start_off .u32 [0 ] = UINT32_MAX ;
20922102#endif
2103+ /* After shared heap chain, will early stop if shared heap is NULL */
2104+ extra -> shared_heap = NULL ;
20932105
20942106#if WASM_ENABLE_PERF_PROFILING != 0
20952107 total_size = sizeof (AOTFuncPerfProfInfo )
0 commit comments