Implement a first version of shared heap feature (#3789)
ps. https://github.com/bytecodealliance/wasm-micro-runtime/issues/3546
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user