Always map new memory for buffers after dumping.
src/buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new memory for every buffer that was dumped.
This commit is contained in:
parent
87374fcc51
commit
f63fc858c3
2 changed files with 15 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-05-17 Fabrice Popineau <fabrice.popineau@gmail.com>
|
||||
|
||||
* buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new
|
||||
memory for every buffer that was dumped.
|
||||
|
||||
2014-05-15 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* fns.c (Freverse): Allow vectors, bool vectors and strings.
|
||||
|
|
19
src/buffer.c
19
src/buffer.c
|
@ -5336,16 +5336,17 @@ init_buffer (void)
|
|||
ptrdiff_t len;
|
||||
|
||||
#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;
|
||||
{
|
||||
struct buffer *b;
|
||||
|
||||
FOR_EACH_BUFFER (b)
|
||||
if (b->text->beg == NULL)
|
||||
enlarge_buffer_text (b, 0);
|
||||
}
|
||||
/* We cannot dump buffers with meaningful addresses that can be
|
||||
used by the dumped Emacs. We map new memory for them here. */
|
||||
FOR_EACH_BUFFER (b)
|
||||
{
|
||||
b->text->beg = NULL;
|
||||
enlarge_buffer_text (b, 0);
|
||||
}
|
||||
}
|
||||
#endif /* USE_MMAP_FOR_BUFFERS */
|
||||
|
||||
Fset_buffer (Fget_buffer_create (build_string ("*scratch*")));
|
||||
|
|
Loading…
Add table
Reference in a new issue