-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak in SDL2 build #1364
Comments
Does it grow on it's own? |
I left it over night and didn't grow a lot, to 1GB. But if I scroll, yeah it jumps by around 100MB. Most of it seems to be released often, but not all, and so it will start accumulating over time. |
It might not be a leak after all. 🤔 |
I managed to get memory usage up to 5GB by opening |
After disabling the text-surface-cache I retried moving through lem/frontends/sdl2/text-surface-cache.lisp Lines 25 to 29 in 60a8d57
What's the reason for the surface-cache anyways? Rendering doesn't seem slower without it and it causes problems when it gets really big (backspace with a big cache feels unresponsive). At the very least there should be something cleaning up old entries so it doesn't grow to a ridiculous size. Edit: interestingly clearing the cache while going though the file doesn't seem to have the same effect |
Thank you for your research. |
according to #1255 we are still creating 1 surface per character if line-wrapping is disabled, correct? A compromise might be to either only enable the cache if line-wrapping is disabled, or only enable the cache for small strings. |
I compiled Lem from source on macOS/ARM and there appears to be a memory leak, as the running image grows continuously above 1GB.
The text was updated successfully, but these errors were encountered: