From: "Eli Zaretskii" <eliz@is.elta.co.il>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: 21.2 startup crash on Irix
Date: Wed, 17 Apr 2002 07:53:26 +0300 [thread overview]
Message-ID: <1429-Wed17Apr2002075325+0300-eliz@is.elta.co.il> (raw)
In-Reply-To: <rzqlmbnfi5l.fsf@djlvig.dl.ac.uk> (message from Dave Love on 16 Apr 2002 22:27:50 +0100)
> From: Dave Love <d.love@dl.ac.uk>
> Date: 16 Apr 2002 22:27:50 +0100
>
> > If this helps, please try the change suggested yesterday by Robert A
> > Basch <rbasch@MIT.EDU> in the thread "Emacs 21 mmap problem" in this
> > group.
>
> I'm not reading a group. Please send a reference I can follow if you
> want me to read it.
Since I wrote that, Gerd installed a change (on RC as well), so you
can have it with "cvs up". I attach the diffs for the release branch
below.
> However, I had backed out the mmap changes as well as the .got ones
> to no effect.
The changes I had in mind are not related to unexec, as you will see
from the diffs.
2002-04-16 Gerd Moellmann <gerd@gnu.org>
* buffer.c (MMAP_ALLOCATED_P): New macro to be set from system
configuration files.
(mmap_enlarge): Enlarge mapped regions only if MMAP_ALLOCATED_P
returns 0.
Index: src/buffer.c
===================================================================
RCS file: /cvs/emacs/src/buffer.c,v
retrieving revision 1.358.4.3
retrieving revision 1.358.4.4
diff -u -r1.358.4.3 -r1.358.4.4
--- src/buffer.c 28 Jan 2002 16:56:03 -0000 1.358.4.3
+++ src/buffer.c 16 Apr 2002 07:36:19 -0000 1.358.4.4
@@ -1,5 +1,5 @@
/* Buffer manipulation primitives for GNU Emacs.
- Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001
+ Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -4277,6 +4277,18 @@
#define MEM_ALIGN sizeof (double)
+/* Predicate returning true if part of the address range [START ..
+ END[ is currently mapped. Used to prevent overwriting an existing
+ memory mapping.
+
+ Default is to conservativly assume the address range is occupied by
+ something else. This can be overridden by system configuration
+ files if system-specific means to determine this exists. */
+
+#ifndef MMAP_ALLOCATED_P
+#define MMAP_ALLOCATED_P(start, end) 1
+#endif
+
/* Function prototypes. */
static int mmap_free_1 P_ ((struct mmap_region *));
@@ -4369,16 +4381,13 @@
}
else if (npages > 0)
{
- struct mmap_region *r2;
-
nbytes = npages * mmap_page_size;
/* Try to map additional pages at the end of the region. We
cannot do this if the address range is already occupied by
something else because mmap deletes any previous mapping.
I'm not sure this is worth doing, let's see. */
- r2 = mmap_find (region_end, region_end + nbytes);
- if (r2 == NULL)
+ if (!MMAP_ALLOCATED_P (region_end, region_end + nbytes))
{
POINTER_TYPE *p;
next prev parent reply other threads:[~2002-04-17 4:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-12 18:02 21.2 startup crash on Irix Dave Love
2002-04-13 7:58 ` Eli Zaretskii
2002-04-16 21:27 ` Dave Love
2002-04-17 4:53 ` Eli Zaretskii [this message]
2002-04-19 17:42 ` Dave Love
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429-Wed17Apr2002075325+0300-eliz@is.elta.co.il \
--to=eliz@is.elta.co.il \
--cc=bug-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.