unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Fabrice Popineau <fabrice.popineau@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Question about mmap buffers
Date: Tue, 29 Apr 2014 16:24:09 +0000 (UTC)	[thread overview]
Message-ID: <loom.20140429T182327-415@post.gmane.org> (raw)
In-Reply-To: loom.20140425T131540-411@post.gmane.org


Nobody picked up my question.

So more formally, can we apply a patch like the one below? 
I'm not sure if the mmap_set_vars() function is of any use
at all under Unix. I don't see the point with it. Maybe
it could be entirely removed.

Thanks in advance for your comments.


Fabrice

=== modified file 'src/buffer.c'
--- src/buffer.c	2014-04-24 03:59:19 +0000
+++ src/buffer.c	2014-04-29 15:15:34 +0000

@@ -5336,14 +5341,15 @@
 
 #ifdef USE_MMAP_FOR_BUFFERS
  {
-   /* When using the ralloc implementation based on mmap(2), buffer
-      text pointers will have been set to null in the dumped Emacs.
-      Map new memory.  */
    struct buffer *b;
 
+   /* No buffer can be dumped with a meaningful address.
+      We reallocate them here. */
    FOR_EACH_BUFFER (b)
-     if (b->text->beg == NULL)
-       enlarge_buffer_text (b, 0);
+   {
+     b->text->beg = NULL;
+     enlarge_buffer_text (b, 0);
+   }
  }
 #endif /* USE_MMAP_FOR_BUFFERS */




  reply	other threads:[~2014-04-29 16:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-25 11:20 Question about mmap buffers Fabrice Popineau
2014-04-29 16:24 ` Fabrice Popineau [this message]
2014-05-14 18:06   ` Eli Zaretskii
2014-05-17  7:16     ` Eli Zaretskii

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=loom.20140429T182327-415@post.gmane.org \
    --to=fabrice.popineau@gmail.com \
    --cc=emacs-devel@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 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).