VM

Comment 4 for bug 727718

Revision history for this message
Tim Cross (tcross) wrote : Re: [Bug 727718] Re: Space leak

On Thu, Mar 3, 2011 at 9:10 AM, John Hein <email address hidden> wrote:

> Uday Reddy wrote at 20:49 -0000 on Mar 2, 2011:
> > Hi John, do you know which version of Emacs and VM allowed the
> > space to drop back to 55 MB?
>
> For my previous report, I was using:
> vm rev 1099
> GNU Emacs 23.2.1 (i386-portbld-freebsd7.3, GTK+ Version 2.18.7)
> (in -nw mode)
>
>
> > Do you think the new space leak is a difference coming from Emacs
> > or VM?
>
> Not sure, but when I used 'emacs -nw big_inbox', then C-x k, C-x C-f
> big_inbox, it does not seem to leak (repeated a few times).
>
> That is, when I just use emacs to open / close the file, no leak.
>
> But when I use vm as described before to "open & close" the file, the
> 2 MB leak per iteration happens.
>
> I also tried with vm 8.1.1 and the same emacs.
> It had leaks, too.
>
> --
> You received this bug notification because you are subscribed to VM.
> https://bugs.launchpad.net/bugs/727718
>
> Title:
> Space leak
>
> Status in VM (View Mail) for Emacs:
> Confirmed
>
> Bug description:
> After using VM for an hour or so, I have an Emacs session that
> occupies about 100MB, even after killing all buffers. An empty Emacs
> session should only occupy about 10MB. So, space is leaking
> somewhere.
>

Can I ask how you are measuring the memory usage to verify it is actually a
leak? I will test on a couple of systems, but want to make sure we are
actually comparing what we think we are comparing.

Probably also worth mentioning that on some platforms, Linux being one IIRC,
 how memory was allocated will affect how it is released. I've forgotten the
full details, but from what I recall, if the memory being allocated is
obtained via mmap (i.e. was larger than page size), it will be returned to
the system when it is freed. However, if the memory was not obttained via
mmap, it will be held by the process until the process terminates and not
released back to the system. This memory would be available to be used again
by the process, but the memory footprint of the process would not change if
you do things like kill buffers etc

Of course this is very system dependent. One useful tool under Linux is
pmap, which gives more detail than using something like ps, which only gives
course grained stats.

I will see if I can gather some stats from both my 32bit and 64bit Linux
systems. I think I've got a couple of large mailboxes that could help.

Tim