diff --git a/src/emacs.c b/src/emacs.c index 43f8d27b3ea54562821d4332e550eda18bb23556..bf701f8666ccdd9cfd6e9fdcb9f7d82420df3865 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -501,6 +501,7 @@ main (argc, argv, envp) { malloc_set_state (malloc_state_ptr); free (malloc_state_ptr); + r_alloc_reinit (); } #endif @@ -577,7 +578,7 @@ main (argc, argv, envp) #endif /* LINK_CRTL_SHARE */ #endif /* VMS */ -#ifdef HAVE_SETRLIMIT +#if defined (HAVE_SETRLIMIT) && defined (RLIMIT_STACK) /* Extend the stack space available. */ if (!getrlimit (RLIMIT_STACK, &rlim)) { @@ -598,7 +599,7 @@ main (argc, argv, envp) setrlimit (RLIMIT_STACK, &rlim); } -#endif +#endif /* HAVE_SETRLIMIT and RLIMIT_STACK */ /* Record (approximately) where the stack begins. */ stack_bottom = &stack_bottom_variable;