unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alexander Shukaev <emacs@Alexander.Shukaev.name>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Lost or corrupted `undo-tree' history
Date: Fri, 10 Jan 2020 19:45:59 -0500	[thread overview]
Message-ID: <jwvftgmx1vc.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <64a45342-251e-06b3-d836-6a0f19e3c114@Alexander.Shukaev.name> (Alexander Shukaev's message of "Fri, 10 Jan 2020 10:19:15 +0100")

> default value and garbage collecting starts immediately. However, the memory
> consumption of Emacs does not fall back to 500MB, but rather goes down to
> only e.g. 6GB, which afterwards are never ever reclaimed.

As Eli mentioned, this is considered normal and not a leak.
It only becomes a leak when the unused memory held cannot be reused
for anything.

> If I repeat the test, the memory consumption would immediately
> continue to grow off 6GB further as if those 6GB are not reused and
> are somehow stuck holding something that cannot be reclaimed anymore.

This is more serious, OTOH.
It might indeed be symptom of a leak.  Of course, it can also come from
a problem of fragmentation, or a number of other undesirables effects.

Delaying GC (by raising `gc-cons-threshold`) tends to both increase the
time it takes to a perform a GC cycle and also increase fragmentation.
This is why Emacs's default setting errs on the side of GC'ing rather
more often than less often.


        Stefan




  parent reply	other threads:[~2020-01-11  0:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 22:45 Lost or corrupted `undo-tree' history Alexander Shukaev
2020-01-10  8:07 ` Eli Zaretskii
2020-01-10  9:19   ` Alexander Shukaev
2020-01-10  9:31     ` Eli Zaretskii
2020-01-10 10:27       ` Alexander Shukaev
2020-01-11  0:45     ` Stefan Monnier [this message]
2020-02-18 17:39 ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwvftgmx1vc.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacs@Alexander.Shukaev.name \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).