(set_buffer_internal_1) [REL_ALLOC_MMAP]: If
buffer's text buffer is null, map new memory.
This commit is contained in:
parent
0a58f94648
commit
684b01ee39
1 changed files with 11 additions and 0 deletions
11
src/buffer.c
11
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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue