-
Notifications
You must be signed in to change notification settings - Fork 617
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 when sinking a lot of output #1853
Comments
This suggests that it's likely pages being leaked, at least in my real-world case: Line 160 in 7e52f94
|
I'm unable to reproduce the "output sinking" leak. My memory stabilizes and then is freed to prior values when I close the window. macOS as well. I notice you're looking at "Memory" but that includes virtual memory which the OS is unlikely to reclaim until it actually needs it. It's not a good measure of application memory usage (for anything). Have you checked "Real Memory" instead? That value is more important and the one I see resetting for me. Virtual memory doesn't drop for me, but that's to be expected. EDIT: I'm not disregarding that there are leaks, but I'm not seeing anything extreme so at most it's minor in the output sinking case, as far as I can confirm so far. |
Ok, looks like the leak I'm running into in real-world usage is caused by resizing and it seems to be a different issue, so I've split it off to #1857. Will see if I can get more details for this one. |
As far as I know, Activity Monitor's "Real Memory" is RSS, and "Memory" is phys_footprint. RSS drops a lot because it doesn't include swapped or compressed pages, so in general "Memory" does seem to be a better indicator of real memory footprint than RSS. The
macOS malloc tends to call madvise(MADV_FREE_REUSABLE) pretty quickly, which subtracts from phys_footprint and adds to the Reclaimable column reported by Here's my config in case it helps:
Same window size as #1857, but with no resizing. I just left |
Ah, the malloc leak only seems to occur when running under Xcode's debugger. Only #1857 shows up in real-world usage. Sorry for the false alarm. |
I saw #254 and #1379, but I think there's still a memory leak somewhere.
Repro for output sinking:
xxd /dev/zero
The text was updated successfully, but these errors were encountered: