This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
forked from jxcore/jxcore
-
Notifications
You must be signed in to change notification settings - Fork 4
Test: heavy memory leak in iOS test app #104
Comments
enricogior
changed the title
Heavy memory leak in iOS test app
test: heavy memory leak in iOS test app
Jan 31, 2017
enricogior
changed the title
test: heavy memory leak in iOS test app
Test: heavy memory leak in iOS test app
Jan 31, 2017
We tried to isolate the larger memory leaks reducing the tests executed, but that in turn changed the way memory got allocated for each test by the javascript engine. We suspect that starting and stopping the sub-engine doesn't fully reset the memory allocation, therefore a memory leaked after been allocated in a specific test, will not necessary be allocated during that test if the previous tests are not executed. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This could be due to the way we restart instances in JXcore, or could be due to the test app itself. In any case, it should be investigated before we release the restartable instance feature.
When running the iOS test app, used memory keeps growing unbounded. In a regular run, it goes from ~40MB at the beginning to ~1.3GB at the end. With a debug build, it goes up to ~2.85GB, which leads to out-of-memory errors on 32-bit devices.
I wanted to verify if the leaks were due to some functionality exercised by the tests, so I modified the app to run an empty test in a loop 10k times. The results show that this is enough to cause the leak.
After 2k iterations:
Memory is never recovered until we go to out-of-memory. This means that it's not a lazy-gc issue, it's an actual leak.
The text was updated successfully, but these errors were encountered: