[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory again

From: Stefan Monnier
Subject: Re: Memory again
Date: Tue, 06 Dec 2011 14:53:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

> I'm writing this message on that very same emacs process. Right now it
> has 60 buffers, all of them with a size below 50KB and most below
> 10KB. As reported by `htop', the process is using 533MB of RES memory
> and 630MB of VIRT memory.

Nothing of what you say sounds worrisome: apparently you now have around
half a GB of memory allocated for use by Lisp data.  Most likely the
majority of it is considered by Emacs as "free for reuse", but it's not
returned to the OS because that is only done in "big chunks" (typically
10KB or so) and none of the big chunks are 100% free (they all contain
at least one non-free object).
Some of that memory may also belong to malloc rather than to Emacs:
Emacs did pass it to `free', but the malloc library decided that it's
not worth returning those elements to the OS.
Of course, it may also be that we have an actual leak (i.e. some of that
memory was neither returned to malloc, nor is it still managed by
Emacs).  But as long as you don't have evidence of a leak, I'd suggest
you move on, because there's really not much we can do about the above
problem (short of rewriting the whole memory management to make it


reply via email to

[Prev in Thread] Current Thread [Next in Thread]