[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/igc 5675290ef8a: igc.org: Pdump, new section
From: |
Gerd Moellmann |
Subject: |
scratch/igc 5675290ef8a: igc.org: Pdump, new section |
Date: |
Sat, 28 Dec 2024 01:04:01 -0500 (EST) |
branch: scratch/igc
commit 5675290ef8a60bedd102d4ef124e25786442dfaf
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
igc.org: Pdump, new section
---
admin/igc.org | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/admin/igc.org b/admin/igc.org
index 1207675a1e8..04626b2c5a7 100644
--- a/admin/igc.org
+++ b/admin/igc.org
@@ -327,3 +327,41 @@ receive in =igc_process_messages=. We call =finalize= on
the object
contained in the message, and =finalize= dispatches to various subroutines
with the name prefix =finalize_= to do the finalization for different Lisp
object types. Examples: =finalize_font=, =finalize_bignum=, and so on.
+
+* Pdump
+
+Emacs' portable dumper (pdumper) writes a large number of Lisp objects
+into a file when a dump is created, and it loads that file into memory
+when Emacs is initialized.
+
+in an Emacs using the traditional GC, once the pdump is loaded, we have
+the following situation:
+
+- The pdump creates in a number of memory regions containing Lisp
+ objects.
+- These Lisp objects are used just like any other Lisp object by
+ Emacs. They are not read-only, they can be modified.
+- Since the objects are modifiable, the traditional GC has to scan
+ them for references in its mark phase.
+- The GC doesn't sweep the objects from the pdump, of course. It can't
+ because the objects were not not allocated normally, and there's no
+ need to anyway.
+
+With igc, things are a bit different.
+
+We need to scan the objects in the pdump for the same reason the old GC
+has to. To do the scanning, we could make the memory areas that the
+pdumper creates roots. This is not a good solution because the pdump is
+big, and we want to keep the number and size of roots low because this
+has an impact on overall GC performance.
+
+What igc does instead is that it doesn't let the pdumper create memory
+areas as it does with the traditional GC. It allocates memory from MPS
+instead.
+
+The Lisp objects contained in the pdump are stored in a way that they
+come from a pdump becomes transparent. The objects are like any other
+Lisp objects that are later allocated normally.
+
+The code doing this can be found in =igc_on_pdump_loaded,= =igc_alloc_dump=,
+and their subroutines.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/igc 5675290ef8a: igc.org: Pdump, new section,
Gerd Moellmann <=