diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c index 3a830476d03..5c5c2e05b25 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -4217,12 +4217,29 @@ init_buffer_once () | |||
| 4217 | void | 4217 | void |
| 4218 | init_buffer () | 4218 | init_buffer () |
| 4219 | { | 4219 | { |
| 4220 | char buf[MAXPATHLEN+1]; | 4220 | char buf[MAXPATHLEN + 1]; |
| 4221 | char *pwd; | 4221 | char *pwd; |
| 4222 | struct stat dotstat, pwdstat; | 4222 | struct stat dotstat, pwdstat; |
| 4223 | Lisp_Object temp; | 4223 | Lisp_Object temp; |
| 4224 | int rc; | 4224 | int rc; |
| 4225 | 4225 | ||
| 4226 | #ifdef REL_ALLOC_MMAP | ||
| 4227 | { | ||
| 4228 | /* When using the ralloc implementation based on mmap(2), buffer | ||
| 4229 | text pointers will have been set to null in the dumped Emacs. | ||
| 4230 | Map new memory. */ | ||
| 4231 | struct buffer *b; | ||
| 4232 | |||
| 4233 | BLOCK_INPUT; | ||
| 4234 | for (b = all_buffers; b; b = b->next) | ||
| 4235 | if (b->text->beg == NULL) | ||
| 4236 | BUFFER_REALLOC (BUF_BEG_ADDR (b), | ||
| 4237 | (BUF_Z_BYTE (b) - BUF_BEG_BYTE (b) | ||
| 4238 | + BUF_GAP_SIZE (b) + 1)); | ||
| 4239 | UNBLOCK_INPUT; | ||
| 4240 | } | ||
| 4241 | #endif /* REL_ALLOC_MMAP */ | ||
| 4242 | |||
| 4226 | Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); | 4243 | Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); |
| 4227 | if (NILP (buffer_defaults.enable_multibyte_characters)) | 4244 | if (NILP (buffer_defaults.enable_multibyte_characters)) |
| 4228 | Fset_buffer_multibyte (Qnil); | 4245 | Fset_buffer_multibyte (Qnil); |