From 0508315fde49b3fddfe720e3f31958cf2761fa03 Mon Sep 17 00:00:00 2001 From: nihui Date: Tue, 8 Dec 2020 17:16:42 +0800 Subject: [PATCH] smaller initial memory for emscripten target --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 85ea64b71ba7..ef5977889e00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,9 +100,9 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "cmake") if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s FORCE_FILESYSTEM=1 -s INITIAL_MEMORY=1024MB -s EXIT_RUNTIME=1") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s FORCE_FILESYSTEM=1 -s INITIAL_MEMORY=1024MB -s EXIT_RUNTIME=1") - set(CMAKE_EXECUTBLE_LINKER_FLAGS "${CMAKE_EXECUTBLE_LINKER_FLAGS} -s FORCE_FILESYSTEM=1 -s INITIAL_MEMORY=1024MB -s EXIT_RUNTIME=1") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s FORCE_FILESYSTEM=1 -s INITIAL_MEMORY=256MB -s EXIT_RUNTIME=1") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s FORCE_FILESYSTEM=1 -s INITIAL_MEMORY=256MB -s EXIT_RUNTIME=1") + set(CMAKE_EXECUTBLE_LINKER_FLAGS "${CMAKE_EXECUTBLE_LINKER_FLAGS} -s FORCE_FILESYSTEM=1 -s INITIAL_MEMORY=256MB -s EXIT_RUNTIME=1") if(NCNN_OPENMP AND NCNN_SIMPLEOMP) # TODO better flags for emscripten