emscripten-core / emscripten-core/emscripten

INITIAL_MEMORY requested memory cannot be released

Open
#19,941 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

When I release my wasm instance, The memory requested by INITIAL_MEMORY cannot be released,Here is the code I released:
![image](https://github.com/emscripten-core/emscripten/assets/109459232/16b9a42c-c0fe-4c4e-a6a5-d7ab461e7e2a)
I checked it using web memory monitoring tools:
![image](https://github.com/emscripten-core/emscripten/assets/109459232/bea583e9-1a03-4e9e-b85d-db3a0d1f88f3)
My Engineering Construction CMAKE:
`set(EMSCRIPTEN_FLAGS
"-s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -s \"EXPORTED_RUNTIME_METHODS=['ccall', 'cwrap']\" -s ALLOW_MEMORY_GROWTH=1 \
-s \"EXPORTED_FUNCTIONS=['_free']\" -s MODULARIZE=1 -s MODULARIZE=1 -s EXPORT_ES6=1 -s USE_ES6_IMPORT_META=0 -s ENVIRONMENT='web,worker' \
-s TOTAL_STACK=5242880 -s TOTAL_MEMORY=134217728 -s INITIAL_MEMORY=33554432 -s USE_SDL=2 -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0 -s USE_SDL_TTF=2 --preload-file=../simhei.ttf@simhei.ttf"
)`
emsdk version:
![image](https://github.com/emscripten-core/emscripten/assets/109459232/51fe4a6d-478c-42c5-8f97-9c4c83ada88e)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.