[Top][All Lists]

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

Re: Emacs bzr memory footprint

From: Dmitry Antipov
Subject: Re: Emacs bzr memory footprint
Date: Fri, 21 Oct 2011 22:29:25 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0

On 10/21/2011 07:22 PM, Nix wrote:

Really? I double-checked the glibc-2.12 malloc source

Hmm... I didn't check the sources and didn't any tests, but info manual from 
2.14 says:

         All chunks larger than this value are allocated outside the
         normal heap, using the `mmap' system call.  This way it is
         guaranteed that the memory for these chunks can be returned
         to the system on `free'.  Note that requests smaller than
         this threshold might still be allocated via `mmap'.

That's why Emacs uses mallopt (M_MMAP_MAX, 0) each time before allocating
chunks for Lisp data - this effectively says 'no more mapped areas please',
regardless of the requested size.

The manual may be outdated, so I'll check this too. If you're right,
these calls of mallopt (M_MMAP_MAX, 0) becomes redundant with never glibcs
(but still should present for compatibility with old versions).


reply via email to

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