emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs bzr memory footprint


From: James Cloos
Subject: Re: Emacs bzr memory footprint
Date: Fri, 14 Oct 2011 14:13:27 -0400
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux)

>>>>> "CM" == Carsten Mattner <address@hidden> writes:

CM> I've been wondering whether it's normal for Emacs to start with
CM> 10 or 20 megs and stay at ~100 megs after opening and closing
CM> multiple buffers.

How many fonts do you have installed?  In how many directories?

fontconfig mmap(2)s every fc cache file, bloating the VM numbers.
But those are read-only, so every app uses the same chunk of ram
for each of those files, just like shared libraries.

The gtk gui pulls in quite a few libraries.  That also will bloat
the VM numbers.

You may also end up with several font files mmap(2)ed by fc.  Again,
read-only.

Look at the output of:

     ;: lsof -p $(pgrep emacs)

It should give you an idea of how many files are mmap(2)ed.

On linux you also can look at /proc/$PID/maps.  The BSDs also may
support something like that.  My emacs maps file has 656 entries.
And that is with the (lighter-weight) athena toolkit.

One third of those mmap(2)ed files are fontconfig cache files.

(Note that, for the typical library, the elf sections -- such as data,
rodata, text, etc -- are separately mmap(2)ed.  So there will be three
to four times as many library lines in maps as libraries loaded.)

-JimC
-- 
James Cloos <address@hidden>         OpenPGP: 1024D/ED7DAEA6



reply via email to

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