From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: MPS symbols Date: Fri, 28 Jun 2024 17:41:42 +0200 Message-ID: <87wmm9ulah.fsf@gmail.com> References: <87r0chwnzx.fsf@gmail.com> <87ikxtwljl.fsf@gmail.com> <86cyo148rq.fsf@gnu.org> <8734oxw55g.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37068"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 28 17:42:36 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sNDkB-0009UC-SO for ged-emacs-devel@m.gmane-mx.org; Fri, 28 Jun 2024 17:42:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNDjR-0005JO-4W; Fri, 28 Jun 2024 11:41:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNDjP-0005J8-Rz for emacs-devel@gnu.org; Fri, 28 Jun 2024 11:41:47 -0400 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNDjN-000184-NG; Fri, 28 Jun 2024 11:41:47 -0400 Original-Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-42564a0d3ceso5277785e9.0; Fri, 28 Jun 2024 08:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719589303; x=1720194103; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=d7bk6OBENLmrE6fpbtXgezv3sTO6nqfna6D3+vpHOtU=; b=OWc/gzNZMcmfvn3LgKXr2Ubm1mO4s7AYhPOtxCWeDbNEeAl2zYED7cIBMbt3Uxc8vA WNm6TGXYE9O5T/SUozwzh5sNJhUT6vrEeAzR/hM/38ToFWqafpCxmgrCQYAH1a314Nf8 DOKo8MNnxJy9fPnaYS0LHhFba8nPE5N0/3o32E57wVgQPWoDVet5h30fV1XFJ8cU3UuN mijZF6SYarxj4oImc0aeTCCWw7uOIC3XRR1yKdPUzXrCcwHPFHs/xfu4gl2ELEapjJXC jVQrg2dtw/koF6fN3kuPpyawdpDTMCQj746cIUsSktcAyz/d7R2lVLHoFKCAy+EPtQNe 6QNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719589303; x=1720194103; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=d7bk6OBENLmrE6fpbtXgezv3sTO6nqfna6D3+vpHOtU=; b=cXqkcr6IguBO74s03RV3KkYFd8rqQZEn7IxSJVmNKWeHZTRncr9G1tvk96CirNJO1E ioiYTrvnM+d5z75O2wfP3GF0J2OMaE1iJhsgUfYDCxrmxCS/51U45MW9DcLklsNpmdxz spf8OaR0g97txLq5nZI3hAKkPd/Q3304sLzw1KbpKCjQkF9oBi0ZFv/4GCUPnkyNYDTo mFS8SNo7E+1Ho/a8RlJEoy5V9RTJvTyVJB0kBt8N53Q5ZuL7R0kOVuguYUb6UOaCkvBO e9Gw+Jp1rQunLzsxlXNBAl64yFXKMJuknrpgN4zv6ni9AaR5y4fFCQPjKM7BupogcHtT GAkg== X-Forwarded-Encrypted: i=1; AJvYcCW+143tkyPhtsPreOLc20+MufY3nEOb5HXO2yjXNuTS8OwATfqCikm9QR/xJrWPjzxTyhtaNtRWE/rM15IUZn2u/kw0 X-Gm-Message-State: AOJu0YwElJdy9Rsc+/+tTlcJZUX5VvWPsyweJpJyKza/89KZNaewF3UP stkpFZQEcG3myS5PCx31/t2XBg8fVCD1VZnNeHslwwC8oN2VX6MyMBzfTg== X-Google-Smtp-Source: AGHT+IFFcExMSh+oysm63DQPlfpqLSdKtVt/9ZFURVd1ZqXs5DNha8zy5l47ETDl2hbYs6GCCJcZrA== X-Received: by 2002:a05:600c:32b0:b0:424:ac65:d8df with SMTP id 5b1f17b1804b1-424ac65d97cmr66694875e9.17.1719589303297; Fri, 28 Jun 2024 08:41:43 -0700 (PDT) Original-Received: from caladan (dial-187254.pool.broadband44.net. [212.46.187.254]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af5b66csm40501135e9.18.2024.06.28.08.41.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 08:41:42 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Fri, 28 Jun 2024 16:46:01 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=eller.helmut@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320820 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Jun 28 2024, Gerd M=C3=B6llmann wrote: > Gerd M=C3=B6llmann writes: > >>> EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1) / sizeof >>> (EMACS_INT)] =3D {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: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fir-pure-root-size-again.patch >From acba908affb92090785fbf77360d5d84ce4b14f9 Mon Sep 17 00:00:00 2001 From: Helmut Eller 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 --=-=-=--