Mercurial > emacs
comparison src/emacs.c @ 18758:231be0c398fd
(main): Use setrlimit only if RLIMIT_STACK.
(main) [DOUG_LEA_MALLOC]: Call r_alloc_reinit when restarting a dumped Emacs.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 12 Jul 1997 07:07:26 +0000 |
parents | ec9c20bede0c |
children | b8d11c38bff9 |
comparison
equal
deleted
inserted
replaced
18757:9d6149f4c762 | 18758:231be0c398fd |
---|---|
499 #ifdef DOUG_LEA_MALLOC | 499 #ifdef DOUG_LEA_MALLOC |
500 if (initialized) | 500 if (initialized) |
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 |
507 sort_args (argc, argv); | 508 sort_args (argc, argv); |
508 | 509 |
575 environ = envp; | 576 environ = envp; |
576 #endif /* SHARABLE_LIB_BUG */ | 577 #endif /* SHARABLE_LIB_BUG */ |
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 { |
584 long newlim; | 585 long newlim; |
585 /* Approximate the amount regex.c needs, plus some more. */ | 586 /* Approximate the amount regex.c needs, plus some more. */ |
596 if (rlim.rlim_cur < newlim) | 597 if (rlim.rlim_cur < newlim) |
597 rlim.rlim_cur = newlim; | 598 rlim.rlim_cur = newlim; |
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; |
605 | 606 |
606 #ifdef RUN_TIME_REMAP | 607 #ifdef RUN_TIME_REMAP |