Always allocate linear memory using mmap (#3052)

With this approach we can omit using memset() for the newly allocated memory
therefore the physical pages are not being used unless touched by the program.

This also simplifies the implementation.
This commit is contained in:
Marcin Kolny
2024-02-02 14:17:44 +00:00
committed by GitHub
parent 2eb60060d8
commit a27ddece7f
25 changed files with 384 additions and 425 deletions

View File

@ -188,6 +188,10 @@
#define WASM_ENABLE_APP_FRAMEWORK 0
#endif
#ifndef WASM_HAVE_MREMAP
#define WASM_HAVE_MREMAP 0
#endif
/* Bulk memory operation */
#ifndef WASM_ENABLE_BULK_MEMORY
#define WASM_ENABLE_BULK_MEMORY 0
@ -521,9 +525,4 @@
#define WASM_ENABLE_QUICK_AOT_ENTRY 1
#endif
/* Disable mmap based shared memory by default */
#ifndef WASM_ENABLE_SHARED_MEMORY_MMAP
#define WASM_ENABLE_SHARED_MEMORY_MMAP 0
#endif
#endif /* end of _CONFIG_H_ */