Enable merged os_mmap for aot data sections (#3681)

And enable merged os_mmap for aot data and text sections except on
platform nuttx and esp-idf.

Fix issue that aarch64 AOT module fails to load on android:
https://github.com/bytecodealliance/wasm-micro-runtime/issues/2274
This commit is contained in:
bianchui
2024-08-14 08:42:01 +08:00
committed by GitHub
parent 1362a305f4
commit 55cb9c59c5
2 changed files with 150 additions and 15 deletions

View File

@ -315,6 +315,13 @@ typedef struct AOTModule {
/* Whether the underlying wasm binary buffer can be freed */
bool is_binary_freeable;
/* `.data` sections merged into one mmaped to reduce the tlb cache miss */
uint8 *merged_data_sections;
uint32 merged_data_sections_size;
/* `.data` and `.text` sections merged into one large mmaped section */
uint8 *merged_data_text_sections;
uint32 merged_data_text_sections_size;
} AOTModule;
#define AOTMemoryInstance WASMMemoryInstance