From: Gerd Moellmann Date: Wed, 6 Sep 2000 21:42:14 +0000 (+0000) Subject: (set_buffer_internal_1) [REL_ALLOC_MMAP]: If X-Git-Tag: emacs-pretest-21.0.90~1771 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=684b01ee39da9caf6b70afd28f461dfcd0b3adca;p=emacs.git (set_buffer_internal_1) [REL_ALLOC_MMAP]: If buffer's text buffer is null, map new memory. --- diff --git a/src/buffer.c b/src/buffer.c index 5c5c2e05b25..a839b1e97a9 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1548,6 +1548,17 @@ set_buffer_internal_1 (b) 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;