diff options
| author | Gerd Moellmann | 2000-09-06 21:42:14 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-09-06 21:42:14 +0000 |
| commit | 684b01ee39da9caf6b70afd28f461dfcd0b3adca (patch) | |
| tree | eb77d8b65b09e835446a5d2155c2a27040def15a /src/buffer.c | |
| parent | 0a58f9464829317ab60b8ed350f07be0618749f0 (diff) | |
| download | emacs-684b01ee39da9caf6b70afd28f461dfcd0b3adca.tar.gz emacs-684b01ee39da9caf6b70afd28f461dfcd0b3adca.zip | |
(set_buffer_internal_1) [REL_ALLOC_MMAP]: If
buffer's text buffer is null, map new memory.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 11 |
1 files changed, 11 insertions, 0 deletions
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) | |||
| 1548 | register Lisp_Object tail, valcontents; | 1548 | register Lisp_Object tail, valcontents; |
| 1549 | Lisp_Object tem; | 1549 | Lisp_Object tem; |
| 1550 | 1550 | ||
| 1551 | #ifdef REL_ALLOC_MMAP | ||
| 1552 | if (b->text->beg == NULL) | ||
| 1553 | { | ||
| 1554 | BLOCK_INPUT; | ||
| 1555 | BUFFER_REALLOC (BUF_BEG_ADDR (b), | ||
| 1556 | (BUF_Z_BYTE (b) - BUF_BEG_BYTE (b) | ||
| 1557 | + BUF_GAP_SIZE (b) + 1)); | ||
| 1558 | UNBLOCK_INPUT; | ||
| 1559 | } | ||
| 1560 | #endif /* REL_ALLOC_MMAP */ | ||
| 1561 | |||
| 1551 | if (current_buffer == b) | 1562 | if (current_buffer == b) |
| 1552 | return; | 1563 | return; |
| 1553 | 1564 | ||