comparison src/regex.c @ 3300:a034c4bd7877

[xemacs-hg @ 2006-03-25 11:27:43 by malcolmp] regex.c: Bump INIT_FAILURE_ALLOC and re_max_failures to the current values found in GNU Emacs.
author malcolmp
date Sat, 25 Mar 2006 11:27:49 +0000
parents cd00e5eeb22a
children 8418d1ad4944
comparison
equal deleted inserted replaced
3299:b593e47979a5 3300:a034c4bd7877
1312 1312
1313 /* Number of failure points for which to initially allocate space 1313 /* Number of failure points for which to initially allocate space
1314 when matching. If this number is exceeded, we allocate more 1314 when matching. If this number is exceeded, we allocate more
1315 space, so it is not a hard limit. */ 1315 space, so it is not a hard limit. */
1316 #ifndef INIT_FAILURE_ALLOC 1316 #ifndef INIT_FAILURE_ALLOC
1317 #define INIT_FAILURE_ALLOC 5 1317 #define INIT_FAILURE_ALLOC 20
1318 #endif 1318 #endif
1319 1319
1320 /* Roughly the maximum number of failure points on the stack. Would be 1320 /* Roughly the maximum number of failure points on the stack. Would be
1321 exactly that if always used MAX_FAILURE_SPACE each time we failed. 1321 exactly that if always used MAX_FAILURE_SPACE each time we failed.
1322 This is a variable only so users of regex can assign to it; we never 1322 This is a variable only so users of regex can assign to it; we never
1323 change it ourselves. */ 1323 change it ourselves. */
1324 #if defined (MATCH_MAY_ALLOCATE) 1324 #if defined (MATCH_MAY_ALLOCATE)
1325 /* 4400 was enough to cause a crash on Alpha OSF/1, 1325 /* 4400 was enough to cause a crash on Alpha OSF/1,
1326 whose default stack limit is 2mb. */ 1326 whose default stack limit is 2mb. */
1327 int re_max_failures = 20000; 1327 int re_max_failures = 40000;
1328 #else 1328 #else
1329 int re_max_failures = 2000; 1329 int re_max_failures = 4000;
1330 #endif 1330 #endif
1331 1331
1332 union fail_stack_elt 1332 union fail_stack_elt
1333 { 1333 {
1334 re_char *pointer; 1334 re_char *pointer;