Implement shared heap for AOT (#3815)

This commit is contained in:
Wenyong Huang
2024-09-29 12:50:59 +08:00
committed by GitHub
parent c4aa1deda5
commit 9ba36e284c
29 changed files with 684 additions and 81 deletions

View File

@ -92,7 +92,6 @@ typedef union {
uint32 u32[2];
} MemBound;
#if WASM_ENABLE_SHARED_HEAP != 0
typedef struct WASMSharedHeap {
struct WASMSharedHeap *next;
void *heap_handle;
@ -101,7 +100,6 @@ typedef struct WASMSharedHeap {
uint64 start_off_mem64;
uint64 start_off_mem32;
} WASMSharedHeap;
#endif
struct WASMMemoryInstance {
/* Module type */
@ -366,6 +364,15 @@ typedef struct WASMModuleInstanceExtra {
#if WASM_ENABLE_SHARED_HEAP != 0
WASMSharedHeap *shared_heap;
#if WASM_ENABLE_JIT != 0
/*
* Adjusted shared heap based addr to simple the calculation
* in the aot code. The value is:
* shared_heap->base_addr - shared_heap->start_off
*/
uint8 *shared_heap_base_addr_adj;
MemBound shared_heap_start_off;
#endif
#endif
#if WASM_ENABLE_DEBUG_INTERP != 0 \