Use the command after_free() to check the amount of physical memory being consumed by vim process. If vim process is consuming more than 80% of physical memory, close all open file tabs in GitHub repository vim/vim.
After closing all open tabs in GitHub repository vim/vim, restart the editor.
You will now be redirected to the new tab in GitHub repository vim/vim.
Follow the same steps above to close all other open tabs in other GitHub repositories. By closing all open tabs in GitHub repository vim/vim, you reduce the amount of memory being consumed by the process by 80%. It also cleans up the cache files to give the system more memory.
vim/vim - closing all tabs
After closing all open tabs in vim/vim, restart the editor.
You will now be redirected to the new tab in vim/vim.
Check if vim is running in a daemon mode
If vim process is running in daemon mode, you need to kill the process.
On Linux/Unix:
sudo kill -9 $PGID
On Windows:
taskkill /PID/NNHNNN-X
Check Total Memory Usage on Process es
The command after_free() is used to check the amount of physical memory being consumed by a process. If vim process is consuming more than 80% of physical memory, close all open file tabs in GitHub repository vim/vim. After closing all open tabs in GitHub repository vim/vim, restart the editor. You will now be redirected to the new tab in GitHub repository vim/vim. Follow the same steps above to close all other open tabs in other GitHub repositories. By closing all open tabs in GitHub repository vim/vim, you reduce the amount of memory being consumed by the process by 80%. It also cleans up the cache files to give the system more memory.
Timeline
Published on: 08/23/2022 17:15:00 UTC
Last modified on: 09/04/2022 19:34:00 UTC
References
- https://huntr.dev/bounties/5d389a18-5026-47df-a5d0-1548a9b555d5
- https://github.com/vim/vim/commit/adce965162dd89bf29ee0e5baf53652e7515762c
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/C72HDIMR3KTTAO7QGTXWUMPBNFUFIBRD/
- https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-2946