diff options
| author | Fabrice Popineau | 2014-05-17 10:14:59 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-05-17 10:14:59 +0300 |
| commit | f63fc858c3d4a7d91ccac850025e407cc57b77fc (patch) | |
| tree | 7c1a07ce43c62751d4190a63f1bf40e8d03c8a49 /src/buffer.c | |
| parent | 87374fcc51a31e13dfb105659594b4906990527f (diff) | |
| download | emacs-f63fc858c3d4a7d91ccac850025e407cc57b77fc.tar.gz emacs-f63fc858c3d4a7d91ccac850025e407cc57b77fc.zip | |
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.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/buffer.c b/src/buffer.c index a1142479d04..1f0bd3f0970 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5336,16 +5336,17 @@ init_buffer (void) | |||
| 5336 | ptrdiff_t len; | 5336 | ptrdiff_t len; |
| 5337 | 5337 | ||
| 5338 | #ifdef USE_MMAP_FOR_BUFFERS | 5338 | #ifdef USE_MMAP_FOR_BUFFERS |
| 5339 | { | 5339 | { |
| 5340 | /* When using the ralloc implementation based on mmap(2), buffer | 5340 | struct buffer *b; |
| 5341 | text pointers will have been set to null in the dumped Emacs. | 5341 | |
| 5342 | Map new memory. */ | 5342 | /* We cannot dump buffers with meaningful addresses that can be |
| 5343 | struct buffer *b; | 5343 | used by the dumped Emacs. We map new memory for them here. */ |
| 5344 | 5344 | FOR_EACH_BUFFER (b) | |
| 5345 | FOR_EACH_BUFFER (b) | 5345 | { |
| 5346 | if (b->text->beg == NULL) | 5346 | b->text->beg = NULL; |
| 5347 | enlarge_buffer_text (b, 0); | 5347 | enlarge_buffer_text (b, 0); |
| 5348 | } | 5348 | } |
| 5349 | } | ||
| 5349 | #endif /* USE_MMAP_FOR_BUFFERS */ | 5350 | #endif /* USE_MMAP_FOR_BUFFERS */ |
| 5350 | 5351 | ||
| 5351 | Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); | 5352 | Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); |