aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-09-06 21:25:12 +0000
committerGerd Moellmann2000-09-06 21:25:12 +0000
commit93c27ef1aa381d52cb84866451bc07c6095e1bd4 (patch)
treef89040cf6c39505386bf11c478153c2d555d472b /src
parent09e9dd66e1acab8b399ae62400c13eeee310e888 (diff)
downloademacs-93c27ef1aa381d52cb84866451bc07c6095e1bd4.tar.gz
emacs-93c27ef1aa381d52cb84866451bc07c6095e1bd4.zip
(init_buffer) [REL_ALLOC_MMAP]: Map new buffer
text buffers if necessary.
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c19
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 ()
4217void 4217void
4218init_buffer () 4218init_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);