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

@ -248,12 +248,6 @@ if (WAMR_BUILD_SHARED_MEMORY EQUAL 1)
else ()
add_definitions (-DWASM_ENABLE_SHARED_MEMORY=0)
endif ()
if (WAMR_ENABLE_SHARED_MEMORY_MMAP EQUAL 1)
add_definitions (-DWASM_ENABLE_SHARED_MEMORY_MMAP=1)
message (" Shared memory allocated using mmap enabled")
else ()
add_definitions (-DWASM_ENABLE_SHARED_MEMORY_MMAP=0)
endif ()
if (WAMR_BUILD_THREAD_MGR EQUAL 1)
message (" Thread manager enabled")
endif ()