On 4/3/07, Max Dyckhoff <[EMAIL PROTECTED]> wrote:
My instance of vim (gvim on Windows) appears to have a memory leak, which makes 
me sad. Is this a common thing for everyone, or is there something in my setup 
which might be causing it? It's pretty serious.

When I start gvim and load my standard session, it will take up about 86MB of 
RAM. This includes dozens of buffers, splits, tabs and syntax, so I'm not 
really worried. After about four hours it will be up to more like 120MB, and 
after a couple of days it will be 200MB+.

Loading a "fresh" copy of gvim with all the plugins and my .vimrc, there are 
various actions I can see that increase the memory usage as reported by the Windows Task 
Manager. I have no idea on the validity of the Task Manager, but it's all I have on 
Windows.

        :sp on a new buffer causes a raise of 4-8K.
        :q on a split causes a raise of 4-8K.
        Switching to/from gvim causes a small increase, typically 4-8K for a 
few switches.
        Searching (with *) for a word in a .c file (with syntax highlighting) 
causes it to increase. If you hold down * then you can see the memory usage 
rocket up.
        Basically, pretty much any action.

Any ideas? Will I just have to live with it and restart my vim session every 
couple of days?

Did you try to set the 'maxmemtot' option ? (:help 'maxmemtot')

Does memory drop down if you :bw all buffers ?

If you could simulate thousands of user actions using ClientServer
using some action-simulating script and have vim grow past 400-500 mb
that would be demonstration. It is not easy to distinguish "necessary grow"
from memory leak. But my firefox will predictably grow above
200mb in just couple of days in th air. And it does not have memory leak
for all I know. But if you can cause it grow indefinitely by opening and closing
some page, that would establish a memory leak.

Maybe you simply need to buy anoth 1GB of RAM ?
This sharply reduces feelings from another 200gb process :-)

Yakov

Reply via email to