unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Mendler <mail@daniel-mendler.de>
To: Daniel Colascione <dancol@dancol.org>, emacs-devel@gnu.org
Subject: Re: New GC concept
Date: Fri, 4 Jun 2021 13:06:11 +0200	[thread overview]
Message-ID: <6f7607ad-6841-650b-a165-1e04f974eadf@daniel-mendler.de> (raw)
In-Reply-To: <06073468-e016-52af-9a84-99ef4cf00d78@dancol.org>

Thank you for answering my questions. Did you also consider the approach
of using a non-copying collector, keeping the classical mark and sweep?
Andrea mentioned in his mail that the focus should be on reactivity.
With mark and sweep it is possible to avoid the copying step, which
scales with the live size, such that one can achieve constant pause times.

On the other hand the copying step is probably quick for the expected
Emacs heap sizes. Furthermore with m&s, you have the fragmentation
problem, it is harder to use such a bump-style allocator and it is
harder to separate the generations, which is a requirement for the
hardware write barrier. So I think overall your design is a sound
approach as long as the heap stays at a reasonable size.

Your approach seems to be quite general purpose and does not require
intrusive changes to the Emacs C code; it seems to be relatively
decoupled from the Elisp runtime. Do you think it is realistic to
implement the GC as a "library" behind some abstract interface? Of
course there is some dependence on the object memory layout, but the GC
interface could offer APIs to request objects of different types. It
should then be possible to use different GCs which use a similar
approach (conservative stack scanning, no explicit read/write barriers).

Daniel Mendler




  parent reply	other threads:[~2021-06-04 11:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04  3:30 New GC concept Daniel Colascione
2021-06-04  8:00 ` Daniel Mendler
2021-06-04  9:47   ` Daniel Colascione
2021-06-04 10:50     ` Eli Zaretskii
2021-06-21 13:00       ` Fejfighter
2021-06-21 13:31         ` Eli Zaretskii
2021-06-21 22:43         ` Daniel Colascione
2021-07-24 13:39           ` Fejfighter
2021-06-04 11:06     ` Daniel Mendler [this message]
2021-06-04  8:56 ` Andrea Corallo via Emacs development discussions.
2021-06-07 17:32 ` Matt Armstrong
2021-06-07 18:03   ` Daniel Colascione
2021-06-07 19:51     ` Daniele Nicolodi
2021-06-08  2:22       ` Eli Zaretskii
2021-06-21 22:58         ` Daniel Colascione
2021-06-22 12:59           ` 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

  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=6f7607ad-6841-650b-a165-1e04f974eadf@daniel-mendler.de \
    --to=mail@daniel-mendler.de \
    --cc=dancol@dancol.org \
    --cc=emacs-devel@gnu.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 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).