From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Pip Cet <pipcet@gmail.com>, emacs-devel@gnu.org
Subject: Re: [EXPERIMENT] Emacs with the SpiderMonkey garbage collector
Date: Sun, 26 Nov 2017 00:11:01 -0500 [thread overview]
Message-ID: <jwvo9npprfw.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <9d7be625-85ae-54d5-3897-6f701c8ea124@cs.ucla.edu> (Paul Eggert's message of "Sat, 25 Nov 2017 20:20:53 -0800")
>> But it's not like it doesn't have downsides.
> ... and then you stopped writing! Just when you were getting to the good part!
Off the top of my head:
- `sxhash-eq` is a lot more painful to implement.
- during GC you need *double* the heap space. If you only GC a sub-part
of your heap (e.g. just one generation), then you only need double
that sub-part. So if you only use a copy-GC for the youngest generation
it's not a big deal, but if you use stop© over your whole heap,
we're talking about a 100% overhead on memory usage.
- interaction with C code is significantly more tricky since you really
need to find *all* the pointers into your objects, including random
transient ones that aren't Lisp_Object.
Often, the only sane way out is to disallow access to the actual
pointers from C: e.g. the C code only manipulates "handles" into an
array of actual pointers.
- the most obvious concurrent-GC for stop© requires a read-barrier
rather than a write-barrier.
But I do recommend taking a look at the TI Explorer II's garbage
collector, described in the article below. It's making a really neat
use of the read-barrier!
Stefan
@Article{Courts88,
author = {Robert Courts},
title = {Improving locality of reference in garbage-collecting
memory management system},
journal = CACM,
year = 1988,
volume = 31,
number = 9,
pages = {1128-1138},
doi = {http://doi.acm.org/10.1145/48529.48536},
xnote = {TI Explorer II's GC!!},
abstract = {Modern Lisp systems make heavy use of a garbage-collecting
style of memory management. Generally, the locality of
reference in garbage-collected systems has been very poor.
In virtual memory systems, this poor locality of reference
generally causes a large amount of wasted time waiting on
page faults or uses excessively large amounts of main
memory. An adaptive memory management algorithm,
described in this article, allows substantial improvement
in locality of reference. Performance measurements
indicate that page-wait time typically is reduced
by a factor of four with constant memory size and disk
technology. Alternately, the size of memory typically can
be reduced by a factor of two with constant performance.}
}
next prev parent reply other threads:[~2017-11-26 5:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 19:01 [EXPERIMENT] Emacs with the SpiderMonkey garbage collector Pip Cet
2017-11-24 8:07 ` Paul Eggert
2017-11-24 16:23 ` Pip Cet
2017-11-24 18:20 ` Paul Eggert
2017-11-24 23:27 ` Pip Cet
2017-11-25 0:21 ` Paul Eggert
2017-11-25 23:50 ` Pip Cet
2017-11-24 22:13 ` Stefan Monnier
2017-11-24 23:05 ` Pip Cet
2017-11-25 4:15 ` Stefan Monnier
2017-11-25 23:50 ` Pip Cet
2017-11-26 1:20 ` Stefan Monnier
2017-11-26 4:20 ` Paul Eggert
2017-11-26 5:11 ` Stefan Monnier [this message]
2017-11-26 10:27 ` martin rudalics
[not found] ` <jwva7z9rgqh.fsf-monnier+Inbox@gnu.org>
[not found] ` <9d7be625-85ae-54d5-3897-6f701c8ea124@cs.ucla.edu>
[not found] ` <jwvo9npprfw.fsf-monnier+emacs@gnu.org>
2017-12-01 1:03 ` Steve Fink
[not found] <CAOqdjBe98BpWE- Ey8fPY1DmfCiLYnB06d30Xqf_KMm_muvKbDg@mail.gmail.com>
2017-12-01 17:57 ` Steve Fink
2017-12-03 0:37 ` Pip Cet
2017-12-03 5:24 ` Steve Fink
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=jwvo9npprfw.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=pipcet@gmail.com \
/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).