emscripten-core / emscripten-core/emscripten

In EmscriptenV3.13, STATIC memory and HEAP memory is larger than Emscripten v2.0.13?

Open
#17,206 0 comments 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

The same code , i compile it in EmscriptenV3.13 and EmscriptenV2.0.13 with `--memoryprofile ` , i find In EmscriptenV3.13, STATIC memory and HEAP memory is larger than Emscripten v2.0.13 , and In EmscriptenV3.13 ,there is also a memory leak .

In EmscriptenV2.0.13 , the memory :
![1](https://user-images.githubusercontent.com/32006246/173272967-a0bd7511-87c6-4e9f-bc7d-bca5391ff2a7.JPG)

And In EmscriptenV3.13
![2](https://user-images.githubusercontent.com/32006246/173273005-5dcf3c05-7454-40d5-89ec-b59b7a567dcb.JPG)

And my compile type is
`-s "EXPORTED_RUNTIME_METHODS=['ccall', 'getValue','writeArrayToMemory','print','UTF8ToString']" -s USE_PTHREADS=1 -s INITIAL_MEMORY=500MB -s MAXIMUM_MEMORY=1000MB -s ALLOW_MEMORY_GROWTH=1 -s MAX_WEBGL_VERSION=2 -s USE_FREETYPE=1 -lopenal -s PTHREAD_POOL_SIZE_STRICT=0 -s GL_PREINITIALIZED_CONTEXT=1 --js-library renderer.js -s OFFSCREENCANVAS_SUPPORT=1 -s ENVIRONMENT=web,worker -s EXPORT_NAME='JSPlayerModule' -s MODULARIZE=1 --embed-file LucidaBrightDemiBold.ttf`

The demo and wasm library in https://github.com/yangfangfang1204/wasm_error

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.