From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: jrm@ftfl.ca, mattiase@acm.org, 37006@debbugs.gnu.org
Subject: bug#37006: 27.0.50; garbage collection not happening after 26de2d42
Date: Wed, 14 Aug 2019 18:37:44 -0700 [thread overview]
Message-ID: <18886155-d96b-ae07-1df2-1b1d58a8bbb2@cs.ucla.edu> (raw)
In-Reply-To: <83v9uzrasm.fsf@gnu.org>
Eli Zaretskii wrote:
> However, I'd rather we don't invent new data types unless really
> necessary.
I did that yesterday, in commit 2019-08-13T19:20:40Z!eggert@cs.ucla.edu
(b80559be212292d44ce14ca5e94505cab4d9a868).
> gc-cons-threshold is a Lisp integer, a
> fixnum, so it cannot exceed EMACS_INT_MAX, I think.
No, (setq gc-cons-threshold (1+ most-positive-fixnum)) works and does the right
thing. The variable's value can be any intmax_t value. This is useful for
quantities like GC object byte counts that might not fit into fixnums.
> Can we use for this purpose the existing trapped_write
> field of Lisp_Symbol that is the base for implementing Lisp watcher
> functions?
Don't see why not.
> With the old code, whenever memory-full was non-nil, and
> consing_since_gc was more than the size of cons_block (about 1KB on my
> system), the very next maybe_gc call would actually trigger GC. With
> the new code, no matter how much consing happened before memory-full
> became non-nil, we still need to cons 1KB worth of objects before GC
> happens. This 1KB might be critical when we are out of memory.
I don't think the scenario is worth worrying about doing a GC now rather than
later. But if we go the trapped_write route, this issue won't matter since the
GC will be done quickly.
>> Immediate-GC might cause GC thrashing, no?
>
> Not sure how, can you elaborate?
When EMacs is low on memory, if we're not careful Emacs could GC every time
maybe_gc is called, which will be roughly equivalent to Emacs hanging and doing
nothing.
next prev parent reply other threads:[~2019-08-15 1:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5075406D-6DB8-4560-BB64-7198526FCF9F@acm.org>
2019-08-11 16:23 ` bug#37006: 27.0.50; garbage collection not happening after 26de2d42 Mattias Engdegård
2019-08-11 17:07 ` Eli Zaretskii
[not found] ` <83h86nu0pq.fsf@gnu.org>
[not found] ` <86pnlbphus.fsf@phe.ftfl.ca>
2019-08-12 2:31 ` Eli Zaretskii
2019-08-12 14:34 ` Joseph Mingrone
2019-08-12 16:49 ` Eli Zaretskii
2019-08-12 17:00 ` Mattias Engdegård
2019-08-13 15:37 ` Eli Zaretskii
2019-08-13 16:48 ` Mattias Engdegård
2019-08-13 17:04 ` Eli Zaretskii
2019-08-13 17:29 ` Mattias Engdegård
2019-08-13 17:21 ` Paul Eggert
2019-08-13 17:53 ` Eli Zaretskii
2019-08-13 19:32 ` Paul Eggert
2019-08-14 16:06 ` Eli Zaretskii
2019-08-15 1:37 ` Paul Eggert [this message]
2019-08-15 14:17 ` Eli Zaretskii
2019-08-15 18:51 ` Paul Eggert
2019-08-15 19:34 ` Eli Zaretskii
2019-09-14 7:51 ` Paul Eggert
2019-09-14 8:30 ` Eli Zaretskii
2019-08-11 12:39 Joseph Mingrone
2019-08-11 15:13 ` Eli Zaretskii
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=18886155-d96b-ae07-1df2-1b1d58a8bbb2@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=37006@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jrm@ftfl.ca \
--cc=mattiase@acm.org \
/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.