From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Colascione <dancol@dancol.org>
Cc: daniele@grinta.net, emacs-devel@gnu.org
Subject: Re: New GC concept
Date: Tue, 22 Jun 2021 15:59:16 +0300 [thread overview]
Message-ID: <837dimukbf.fsf@gnu.org> (raw)
In-Reply-To: <10670fe2-0c84-1990-b67b-b1f2215e17cb@dancol.org> (message from Daniel Colascione on Mon, 21 Jun 2021 15:58:20 -0700)
> Cc: emacs-devel@gnu.org
> From: Daniel Colascione <dancol@dancol.org>
> Date: Mon, 21 Jun 2021 15:58:20 -0700
>
> > The development environment which is used to build the MS-DOS port of
> > Emacs (DJGPP) does support virtual memory (IIUC what that means in
> > this context).
>
> Oh, right. I completely forgot that we have DPMI.
>
> It's been a very long time since I looked at that. Does DJGPP provide
> DPMI 0.9 or 1.0?
The DPMI provider which comes with DJGPP supports DPMI 0.9 with some
extensions. (If one runs a DJGPP program on MS-Windows, one gets what
Windows provides instead, which is DPMI 0.9.)
> To get generational GC under DJGPP, we'll need something like a SIGSEGV
> handler, a bit of code that we run when the CPU signals a memory
> protection fault. I think we get there by installing an exception
> interrupt handler, as in
> http://www.delorie.com/djgpp/doc/dpmi/ch4.5.html, and I think it'll work
> in both DPMI 0.9 and 1.0.
Yes, this is supported.
> Another thing we need for generational GC is
> the ability to mark a range of pages read-only, as with mprotect. I
> think DPMI gives us the ability to change page permissions, but 0.9 does
> not. See http://www.delorie.com/djgpp/doc/dpmi/api/310507.html
DJGPP has mprotect. It indeed requires DPMI 1.0, but it is also one
of the extensions supported by the DPMI provider that comes with
DJGPP.
> The other thing we get with VM is the ability to swap the from-space and
> the to-space without an additional memory copy. DPMI 1.0 appears to
> provide a shared memory facility that would let us do that (the
> equivalent of mmap/MapViewOfFile of an anonymous segment), but I'm not
> sure that DPMI 0.9 gives us that ability.
Right, this requires DPMI 1.0.
> Anyway, even if it is theoretically possible to implement the new GC's
> fancy VM stuff in terms of DPMI, I think it should have lower priority
> than the rest of the system. The new GC run without virtual memory use
> at all should still be no worse overall than the current GC, so MS-DOS
> Emacs at least wouldn't see a regression if we switched to a version of
> the new GC that didn't understand DPMI.
Yes, definitely.
prev parent reply other threads:[~2021-06-22 12:59 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
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 [this message]
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=837dimukbf.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dancol@dancol.org \
--cc=daniele@grinta.net \
--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).