[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pkg bdca01dd38 29/76: Workaround for something Stefan missed
From: |
Gerd Moellmann |
Subject: |
pkg bdca01dd38 29/76: Workaround for something Stefan missed |
Date: |
Fri, 21 Oct 2022 00:16:11 -0400 (EDT) |
branch: pkg
commit bdca01dd38636d77279ae29aed132df3a21389ff
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Workaround for something Stefan missed
See comment there for an explanation.
* src/alloc.c (xmake_pure_vector): Former make_pure_vector.
(init_vectors): Use it to allocate zero_vecgtor.
---
src/alloc.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/alloc.c b/src/alloc.c
index e8a1688104..3b1d7cf0b2 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3030,6 +3030,23 @@ allocate_vector_from_block (ptrdiff_t nbytes);
/* Called once to initialize vector allocation. */
+
+/* PKG-FIXME: Stefan's original patch allocates the zero vector
+ from a block, which doesn't work because that code is not
+ prepared to handle allocations of that size. Do it as before
+ Stefan's patch, because I don't want to deal with it now. */
+
+static Lisp_Object
+xmake_pure_vector (ptrdiff_t len)
+{
+ Lisp_Object new;
+ size_t size = header_size + len * word_size;
+ struct Lisp_Vector *p = pure_alloc (size, Lisp_Vectorlike);
+ XSETVECTOR (new, p);
+ XVECTOR (new)->header.size = len;
+ return new;
+}
+
static void
init_vectors (void)
{
@@ -3041,9 +3058,7 @@ init_vectors (void)
normal heap, e.g. as a static object, and then to "hide" it from the GC,
for example by marking it by hand at the beginning of the GC and unmarking
it by hand at the end. */
- struct Lisp_Vector *zv = allocate_vector_from_block (vroundup (header_size));
- zv->header.size = 0;
- zero_vector = make_lisp_ptr (zv, Lisp_Vectorlike);
+ zero_vector = xmake_pure_vector (0);
staticpro (&zero_vector);
}
- pkg 0e5323c908 16/76: Remove Lisp_Symbol::interned, (continued)
- pkg 0e5323c908 16/76: Remove Lisp_Symbol::interned, Gerd Moellmann, 2022/10/21
- pkg aa00af4e17 26/76: Consider shorthands out of scope, Gerd Moellmann, 2022/10/21
- pkg 4c1bbd4fd7 31/76: intern-soft with ':' trick, Gerd Moellmann, 2022/10/21
- pkg ea65e35cf3 28/76: src/alloc.c: Remove all uses of `pure_alloc`, Gerd Moellmann, 2022/10/21
- pkg a5f6912c6d 30/76: Mapatoms differently, Gerd Moellmann, 2022/10/21
- pkg 2edc30628a 27/76: Use build_pure_c_string, Gerd Moellmann, 2022/10/21
- pkg 85c0eb1682 36/76: Merge remote-tracking branch 'origin/master' into pkg, Gerd Moellmann, 2022/10/21
- pkg 07f0b758ae 62/76: hash_remove_from_table returns bool, Gerd Moellmann, 2022/10/21
- pkg e1a730849e 42/76: Fix printing uninterned symbols, Gerd Moellmann, 2022/10/21
- pkg 1424d2c6b7 61/76: Fix intern-soft, Gerd Moellmann, 2022/10/21
- pkg bdca01dd38 29/76: Workaround for something Stefan missed,
Gerd Moellmann <=
- pkg 62582ea927 72/76: Fix completion for new symbol table layout, Gerd Moellmann, 2022/10/21
- pkg a93ec52542 76/76: Work on Lisp interface, Gerd Moellmann, 2022/10/21
- pkg 9ab00f542f 70/76: Introduce PACKAGE_NAMEX, Gerd Moellmann, 2022/10/21
- pkg 51cd0e05d6 71/76: De-duplicate packages for mapatoms, Gerd Moellmann, 2022/10/21
- pkg 9a263a0782 57/76: Move more package stuff to Lisp, Gerd Moellmann, 2022/10/21
- pkg d374cb202a 43/76: Revert "Use make-package instead of make-vector", Gerd Moellmann, 2022/10/21
- pkg 77543a203a 45/76: Revert "Dpn't assume symbol-name of keywords starts with colon", Gerd Moellmann, 2022/10/21
- pkg 0a345a1181 53/76: Make internals of Lisp_Package visible to Lisp, Gerd Moellmann, 2022/10/21
- pkg 13010d7bd0 47/76: Partially revert "Remove obarrays", Gerd Moellmann, 2022/10/21
- pkg 132f070747 58/76: New predefined hash table test for string-equal, Gerd Moellmann, 2022/10/21