all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Davis Herring <herring@lanl.gov>
To: Dima Kogan <lists@dima.secretsauce.net>
Cc: emacs-devel@gnu.org
Subject: Re: Debugging emacs memory management
Date: Wed, 16 Sep 2015 10:34:58 -0600	[thread overview]
Message-ID: <55F99A32.3000505@lanl.gov> (raw)
In-Reply-To: <87vbbbxz2e.fsf@secretsauce.net>

> Another observation is that the gc never really gives back the memory.
> [...]
> So the memory IS freed, but emacs never gives it back to the OS.

The Emacs GC can relocate some things (e.g., strings) to help make
memory available all the way back to the OS, but -- at least for many
small allocations -- it is typical that memory freed within a process
never makes it back to the OS.  The "small allocations" is because
modern malloc(3)s use mmap(2) to obtain large blocks of memory and those
are returned to the OS immediately upon free(3).  Otherwise the best you
can hope for is for some of Emacs' pages to be dropped to swap, where
(if that memory is never used again by Emacs) they will languish until
Emacs exits.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.



  parent reply	other threads:[~2015-09-16 16:34 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11  6:01 Debugging emacs memory management Dima Kogan
2015-02-11 15:05 ` Stefan Monnier
2015-02-15 20:28   ` Dima Kogan
2015-02-15 20:47     ` Eli Zaretskii
2015-02-16  1:39       ` Stefan Monnier
2015-02-17  7:59         ` Dima Kogan
2015-02-17 15:59           ` Eli Zaretskii
2015-02-18  0:07           ` Stefan Monnier
2015-02-11 19:07 ` Florian Weimer
2015-09-15 19:27 ` Dima Kogan
2015-09-16 16:28   ` Paul Eggert
2015-09-20 22:01     ` Dima Kogan
2015-09-21  6:46       ` Eli Zaretskii
2015-09-21  8:54         ` Dima Kogan
2015-09-21 10:00           ` Eli Zaretskii
2015-09-21 10:21             ` Eli Zaretskii
2015-09-22 21:33               ` Dima Kogan
2015-09-23  6:35                 ` Eli Zaretskii
2015-09-23  6:37                   ` Dima Kogan
2015-09-23  7:16                     ` Eli Zaretskii
2015-10-05  7:21               ` Dima Kogan
2015-10-05  7:55                 ` Eli Zaretskii
2015-10-05  8:24                   ` Dima Kogan
2015-10-05  8:33                     ` Eli Zaretskii
2015-10-05  8:43                     ` Eli Zaretskii
2015-10-05  9:24                       ` Dima Kogan
2015-10-05  9:49                         ` Dima Kogan
2015-10-05  9:58                           ` Andreas Schwab
2015-10-05 10:02                             ` Dima Kogan
2015-10-05 10:47                               ` Eli Zaretskii
2015-10-05 18:19                                 ` Dima Kogan
2015-10-05 18:24                                   ` Eli Zaretskii
2015-10-05 23:21                                   ` Dima Kogan
2015-10-06  2:41                                     ` Eli Zaretskii
2015-10-08 21:51                                       ` Dima Kogan
2015-09-16 16:34   ` Davis Herring [this message]
2015-09-16 22:03   ` Markus Triska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55F99A32.3000505@lanl.gov \
    --to=herring@lanl.gov \
    --cc=emacs-devel@gnu.org \
    --cc=lists@dima.secretsauce.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.