Skip to content

Commit 9e5ad76

Browse files
Shared heap enhancements
2 parents 85dabad + a62d104 commit 9e5ad76

File tree

10 files changed

+521
-267
lines changed

10 files changed

+521
-267
lines changed

core/iwasm/aot/aot_runtime.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ bh_static_assert(offsetof(AOTModuleInstanceExtra, stack_sizes) == 0);
6060
bh_static_assert(offsetof(AOTModuleInstanceExtra, shared_heap_base_addr_adj)
6161
== 8);
6262
bh_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);
6365

6466
bh_static_assert(sizeof(CApiFuncImport) == sizeof(uintptr_t) * 3);
6567

core/iwasm/aot/aot_runtime.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ typedef struct AOTModuleInstanceExtra {
125125
*/
126126
DefPointer(uint8 *, shared_heap_base_addr_adj);
127127
MemBound shared_heap_start_off;
128+
MemBound shared_heap_end_off;
129+
DefPointer(WASMSharedHeap *, shared_heap);
128130

129131
WASMModuleInstanceExtraCommon common;
130132

@@ -142,9 +144,6 @@ typedef struct AOTModuleInstanceExtra {
142144
WASMModuleInstanceCommon **import_func_module_insts;
143145
#endif
144146

145-
#if WASM_ENABLE_SHARED_HEAP != 0
146-
WASMSharedHeap *shared_heap;
147-
#endif
148147
} AOTModuleInstanceExtra;
149148

150149
#if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64)

0 commit comments

Comments
 (0)