emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about mmap buffers


From: Fabrice Popineau
Subject: Re: Question about mmap buffers
Date: Tue, 29 Apr 2014 16:24:09 +0000 (UTC)
User-agent: Loom/3.14 (http://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 via email to

[Prev in Thread] Current Thread [Next in Thread]