From b9c9f761976f3d842b688054c91944a1915a4722 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 25 Apr 2005 03:14:22 +0000 Subject: [PATCH] (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment. --- data/yacc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/yacc.c b/data/yacc.c index 8cde3b03..bc8087dd 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -239,6 +239,10 @@ b4_syncline([@oline@], [@ofile@])[ /* 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 -- 2.47.2