| Summary: | Kate doesn't free up RAM for large files when closed | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | diversalizando <thiagocondiolov> |
| Component: | application | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | christoph, waqar.17a |
| Priority: | NOR | ||
| Version First Reported In: | 25.08.0 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/utilities/kate/-/commit/dd79fc1bc2f643227b3af53b79fce235ea17c619 | Version Fixed/Implemented In: | 25.12.0 |
| Sentry Crash Report: | |||
|
Description
diversalizando
2025-09-04 22:30:15 UTC
We do free memory, so far I know of no large leaks. If you can profile it via heaptrack or valgrind and show a leak, we can take a look. We will not implement own swapping :) Perhaps we can call malloc trim. Glibc malloc doesn't eagerly return memory to the OS. (In reply to Waqar Ahmed from comment #2) > Perhaps we can call malloc trim. Glibc malloc doesn't eagerly return memory > to the OS. One can try that, Konsole has some parts that do that. I can take a look to add that. I will add it to the application, I don't want to do such stuff in the library, that could regress stuff for other applications using us. I will take a look. A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1886 Doing that now after document and project closing. Git commit dd79fc1bc2f643227b3af53b79fce235ea17c619 by Christoph Cullmann. Committed on 13/09/2025 at 21:23. Pushed by cullmann into branch 'master'. use malloc_trim if available to free memory to the system might avoid too large heap sizes in the long run M +3 -0 addons/project/kateprojectplugin.cpp M +5 -1 apps/lib/CMakeLists.txt M +3 -0 apps/lib/katedocmanager.cpp M +11 -0 apps/lib/ktexteditor_utils.cpp M +6 -0 apps/lib/ktexteditor_utils.h https://invent.kde.org/utilities/kate/-/commit/dd79fc1bc2f643227b3af53b79fce235ea17c619 Perhaps fixed in the next release. |