From: Helmut Eller <eller.helmut@gmail.com>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: MPS symbols
Date: Fri, 28 Jun 2024 17:41:42 +0200 [thread overview]
Message-ID: <87wmm9ulah.fsf@gmail.com> (raw)
In-Reply-To: <m2v81tdt1y.fsf@pro2.fritz.box> ("Gerd Möllmann"'s message of "Fri, 28 Jun 2024 16:46:01 +0200")
[-- Attachment #1: Type: text/plain, Size: 357 bytes --]
On Fri, Jun 28 2024, Gerd Möllmann wrote:
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>
>>> EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1) / sizeof
>>> (EMACS_INT)] = {1,};
>>
>> Haven't seen that - mine has no pure space :-).
>
> Should be fixed.
Not quite. The size must be a multiple of the word size. This seems to
work:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fir-pure-root-size-again.patch --]
[-- Type: text/x-diff, Size: 1872 bytes --]
From acba908affb92090785fbf77360d5d84ce4b14f9 Mon Sep 17 00:00:00 2001
From: Helmut Eller <eller.helmut@gmail.com>
Date: Fri, 28 Jun 2024 17:32:08 +0200
Subject: [PATCH] Fir pure root size again
* src/puresize.h (root): Specify array bounds.
* src/igc.c (root_create_pure): Use the size of the type.
* src/array.c (root): Simplify.
---
src/alloc.c | 2 +-
src/igc.c | 4 ++--
src/puresize.h | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/alloc.c b/src/alloc.c
index 80701ae1b38..31cb86e6d0e 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -394,7 +394,7 @@ #define SPARE_MEMORY (1 << 14)
space (pure), on some systems. We have not implemented the
remapping on more recent systems because this is less important
nowadays than in the days of small memories and timesharing. */
-EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1) / sizeof (EMACS_INT)] = {1,};
+EMACS_INT pure[] = {1,};
#define PUREBEG (char *) pure
diff --git a/src/igc.c b/src/igc.c
index aa7c6150aeb..77dd20d64e3 100644
--- a/src/igc.c
+++ b/src/igc.c
@@ -2359,8 +2359,8 @@ root_create_charset_table (struct igc *gc)
static void
root_create_pure (struct igc *gc)
{
- char *start = (char *) &pure[0];
- char *end = start + PURESIZE;
+ void *start = &pure;
+ void *end = &pure + 1;
root_create (gc, start, end, mps_rank_ambig (), scan_pure, NULL, true,
"pure");
}
diff --git a/src/puresize.h b/src/puresize.h
index 4f15dcb6665..a09e60504a8 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -79,7 +79,8 @@ #define PURESIZE (BASE_PURESIZE * PURESIZE_RATIO * PURESIZE_CHECKING_RATIO)
extern AVOID pure_write_error (Lisp_Object);
-extern EMACS_INT pure[];
+extern EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1)
+ / sizeof (EMACS_INT)];
/* The puresize_h_* macros are private to this include file. */
--
2.39.2
next prev parent reply other threads:[~2024-06-28 15:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 7:00 MPS symbols Helmut Eller
2024-06-28 7:42 ` Gerd Möllmann
2024-06-28 7:53 ` Helmut Eller
2024-06-28 8:37 ` Gerd Möllmann
2024-06-28 8:46 ` Gerd Möllmann
2024-06-28 9:19 ` Gerd Möllmann
2024-06-28 11:54 ` Helmut Eller
2024-06-28 12:13 ` Gerd Möllmann
2024-06-28 12:36 ` Gerd Möllmann
2024-06-28 11:16 ` Eli Zaretskii
2024-06-28 11:50 ` Gerd Möllmann
2024-06-28 13:47 ` Helmut Eller
2024-06-28 14:13 ` Gerd Möllmann
2024-06-28 14:46 ` Gerd Möllmann
2024-06-28 15:41 ` Helmut Eller [this message]
2024-06-28 16:06 ` Eli Zaretskii
2024-06-28 16:19 ` Helmut Eller
2024-06-28 17:40 ` Eli Zaretskii
2024-06-28 16:20 ` Gerd Möllmann
2024-06-28 17:59 ` Eli Zaretskii
2024-06-29 3:56 ` Gerd Möllmann
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=87wmm9ulah.fsf@gmail.com \
--to=eller.helmut@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=gerd.moellmann@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).