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:
@ -176,3 +176,10 @@ else()
|
||||
OUTPUT_VARIABLE cmdOutput
|
||||
)
|
||||
endif()
|
||||
|
||||
if (WAMR_BUILD_SPEC_TEST EQUAL 1)
|
||||
execute_process(
|
||||
COMMAND bash -c "sed -i -E 's/<ReservedMemMaxSize>0x1000000<\\/ReservedMemMaxSize>/<ReservedMemMaxSize>0x8000000<\\/ReservedMemMaxSize>/g' ${CMAKE_CURRENT_SOURCE_DIR}/enclave-sample/Enclave/Enclave.config.xml"
|
||||
OUTPUT_VARIABLE cmdOutput
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -391,6 +391,7 @@ CSRCS += nuttx_platform.c \
|
||||
posix_thread.c \
|
||||
posix_time.c \
|
||||
posix_sleep.c \
|
||||
mremap.c \
|
||||
mem_alloc.c \
|
||||
ems_kfc.c \
|
||||
ems_alloc.c \
|
||||
@ -401,6 +402,7 @@ CSRCS += nuttx_platform.c \
|
||||
bh_hashmap.c \
|
||||
bh_list.c \
|
||||
bh_log.c \
|
||||
bh_memutils.c \
|
||||
bh_queue.c \
|
||||
bh_vector.c \
|
||||
bh_read_file.c \
|
||||
@ -416,6 +418,7 @@ CSRCS += nuttx_platform.c \
|
||||
ASRCS += $(INVOKE_NATIVE)
|
||||
|
||||
VPATH += $(SHARED_ROOT)/platform/nuttx
|
||||
VPATH += $(SHARED_ROOT)/platform/common/memory
|
||||
VPATH += $(SHARED_ROOT)/platform/common/posix
|
||||
VPATH += $(SHARED_ROOT)/platform/common/libc-util
|
||||
VPATH += $(SHARED_ROOT)/mem-alloc
|
||||
|
||||
Reference in New Issue
Block a user