HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
917e565
)
(main): Don't extend stack limit too far.
author
Richard M. Stallman
<rms@gnu.org>
Mon, 3 Feb 1997 02:51:09 +0000
(
02:51
+0000)
committer
Richard M. Stallman
<rms@gnu.org>
Mon, 3 Feb 1997 02:51:09 +0000
(
02:51
+0000)
src/emacs.c
patch
|
blob
|
blame
|
history
diff --git
a/src/emacs.c
b/src/emacs.c
index
7349a21
..
d98c304
100644
(file)
--- a/
src/emacs.c
+++ b/
src/emacs.c
@@
-553,7
+553,14
@@
main (argc, argv, envp)
/* Extend the stack space available. */
if (!getrlimit (RLIMIT_STACK, &rlim))
{
- rlim.rlim_cur = rlim.rlim_max;
+ long newlim;
+ /* Approximate the amount regex.c needs, plus some more. */
+ newlim = 800000 * sizeof (char *);
+ if (newlim > rlim.rlim_max)
+ newlim = rlim.rlim_max;
+ if (rlim.rlim_cur < newlim)
+ rlim.rlim_cur = newlim;
+
setrlimit (RLIMIT_STACK, &rlim);
}
#endif