aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-12 07:07:26 +0000
committerRichard M. Stallman1997-07-12 07:07:26 +0000
commitea2acec55b169b4978569fcdbd4c0b70256df313 (patch)
tree4223da0afa31be5bd7d01d8106b5d86d7ad2b6b3
parentdec414188f5a04db0ac23ba29515de0a1f3ed4b8 (diff)
downloademacs-ea2acec55b169b4978569fcdbd4c0b70256df313.tar.gz
emacs-ea2acec55b169b4978569fcdbd4c0b70256df313.zip
(main): Use setrlimit only if RLIMIT_STACK.
(main) [DOUG_LEA_MALLOC]: Call r_alloc_reinit when restarting a dumped Emacs.
-rw-r--r--src/emacs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 43f8d27b3ea..bf701f8666c 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -501,6 +501,7 @@ main (argc, argv, envp)
501 { 501 {
502 malloc_set_state (malloc_state_ptr); 502 malloc_set_state (malloc_state_ptr);
503 free (malloc_state_ptr); 503 free (malloc_state_ptr);
504 r_alloc_reinit ();
504 } 505 }
505#endif 506#endif
506 507
@@ -577,7 +578,7 @@ main (argc, argv, envp)
577#endif /* LINK_CRTL_SHARE */ 578#endif /* LINK_CRTL_SHARE */
578#endif /* VMS */ 579#endif /* VMS */
579 580
580#ifdef HAVE_SETRLIMIT 581#if defined (HAVE_SETRLIMIT) && defined (RLIMIT_STACK)
581 /* Extend the stack space available. */ 582 /* Extend the stack space available. */
582 if (!getrlimit (RLIMIT_STACK, &rlim)) 583 if (!getrlimit (RLIMIT_STACK, &rlim))
583 { 584 {
@@ -598,7 +599,7 @@ main (argc, argv, envp)
598 599
599 setrlimit (RLIMIT_STACK, &rlim); 600 setrlimit (RLIMIT_STACK, &rlim);
600 } 601 }
601#endif 602#endif /* HAVE_SETRLIMIT and RLIMIT_STACK */
602 603
603 /* Record (approximately) where the stack begins. */ 604 /* Record (approximately) where the stack begins. */
604 stack_bottom = &stack_bottom_variable; 605 stack_bottom = &stack_bottom_variable;