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:
@ -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 ()
|
||||
|
||||
Reference in New Issue
Block a user