[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison YYSTACK_ALLOC_MAXIMUM 4032 ?
From: |
Paul Eggert |
Subject: |
Re: bison YYSTACK_ALLOC_MAXIMUM 4032 ? |
Date: |
Sun, 24 Apr 2005 20:15:25 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
address@hidden writes:
> Can the preset value of YYSTACK_ALLOC_MAXIMUM 4032
> be explained some more?
I added this comment:
2005-04-24 Paul Eggert <address@hidden>
* data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
Index: yacc.c
===================================================================
RCS file: /cvsroot/bison/bison/data/yacc.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -p -u -r1.85 -r1.86
--- yacc.c 16 Apr 2005 06:25:03 -0000 1.85
+++ yacc.c 25 Apr 2005 03:14:22 -0000 1.86
@@ -239,6 +239,10 @@ b4_syncline(address@hidden@], address@hidden@])[
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
# endif
# else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: bison YYSTACK_ALLOC_MAXIMUM 4032 ?,
Paul Eggert <=