Implement a first version of shared heap feature (#3789)

ps. https://github.com/bytecodealliance/wasm-micro-runtime/issues/3546
This commit is contained in:
WenLY1
2024-09-14 10:51:42 +08:00
committed by GitHub
parent 27b69176c1
commit 92852f3719
15 changed files with 826 additions and 22 deletions

View File

@ -92,6 +92,17 @@ typedef union {
uint32 u32[2];
} MemBound;
#if WASM_ENABLE_SHARED_HEAP != 0
typedef struct WASMSharedHeap {
struct WASMSharedHeap *next;
void *heap_handle;
uint8_t *base_addr;
uint32_t size;
uint64 start_off_mem64;
uint64 start_off_mem32;
} WASMSharedHeap;
#endif
struct WASMMemoryInstance {
/* Module type */
uint32 module_type;
@ -353,6 +364,10 @@ typedef struct WASMModuleInstanceExtra {
uint32 max_aux_stack_used;
#endif
#if WASM_ENABLE_SHARED_HEAP != 0
WASMSharedHeap *shared_heap;
#endif
#if WASM_ENABLE_DEBUG_INTERP != 0 \
|| (WASM_ENABLE_FAST_JIT != 0 && WASM_ENABLE_JIT != 0 \
&& WASM_ENABLE_LAZY_JIT != 0)