emscripten-core / emscripten-core/emscripten

Possible memory leak inside emscripten_sleep

Open
#14,768 4 comments 0 reactions 0 assignees View on GitHub
wontfix
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Anytime emscripten_sleep runs, it slightly increases usage of memory by the app (due to windows task manages). I thought it can be asynchronously calls, but memory usage kept increasing even if I remove functionality and run only
```
while(1)
emscripten_sleep(0));
```
Then I thought, It might be because of the allocator, which is deallocating memory but not letting it get to the system. Then I saw message for heap reallocation happening, I set breakpoint and at the time it was shooting, in the callstack I saw Asyncify.allocateData() inside handleSleep.
Asan detected no errors.
Would be great to hear some ideas of how to solve this issue

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.