changeset 31416:9b8c5bea5e8d

(set_buffer_internal_1) [REL_ALLOC_MMAP]: If buffer's text buffer is null, map new memory.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 06 Sep 2000 21:42:14 +0000
parents e41c4238ed43
children a902ad11827b
files src/buffer.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Wed Sep 06 21:25:49 2000 +0000
+++ b/src/buffer.c	Wed Sep 06 21:42:14 2000 +0000
@@ -1548,6 +1548,17 @@
   register Lisp_Object tail, valcontents;
   Lisp_Object tem;
 
+#ifdef REL_ALLOC_MMAP
+  if (b->text->beg == NULL)
+    {
+      BLOCK_INPUT;
+      BUFFER_REALLOC (BUF_BEG_ADDR (b),
+		      (BUF_Z_BYTE (b) - BUF_BEG_BYTE (b)
+		       + BUF_GAP_SIZE (b) + 1));
+      UNBLOCK_INPUT;
+    }
+#endif /* REL_ALLOC_MMAP */
+  
   if (current_buffer == b)
     return;