/[pcre]/code/trunk/doc/pcreapi.3
ViewVC logotype

Diff of /code/trunk/doc/pcreapi.3

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 887 by ph10, Tue Jan 17 14:32:32 2012 UTC revision 901 by ph10, Sat Jan 21 15:47:59 2012 UTC
# Line 2413  other alternatives. Ultimately, when it Line 2413  other alternatives. Ultimately, when it
2413  will yield PCRE_ERROR_NOMATCH.  will yield PCRE_ERROR_NOMATCH.
2414  .  .
2415  .  .
2416    .SH "OBTAINING AN ESTIMATE OF STACK USAGE"
2417    .rs
2418    .sp
2419    Matching certain patterns using \fBpcre_exec()\fP can use a lot of process
2420    stack, which in certain environments can be rather limited in size. Some users
2421    find it helpful to have an estimate of the amount of stack that is used by
2422    \fBpcre_exec()\fP, to help them set recursion limits, as described in the
2423    .\" HREF
2424    \fBpcrestack\fP
2425    .\"
2426    documentation. The estimate that is output by \fBpcretest\fP when called with
2427    the \fB-m\fP and \fB-C\fP options is obtained by calling \fBpcre_exec\fP with
2428    the values NULL, NULL, NULL, -999, and -999 for its first five arguments.
2429    .P
2430    Normally, if its first argument is NULL, \fBpcre_exec()\fP immediately returns
2431    the negative error code PCRE_ERROR_NULL, but with this special combination of
2432    arguments, it returns instead a negative number whose absolute value is the
2433    approximate stack frame size in bytes. (A negative number is used so that it is
2434    clear that no match has happened.) The value is approximate because in some
2435    cases, recursive calls to \fBpcre_exec()\fP occur when there are one or two
2436    additional variables on the stack.
2437    .P
2438    If PCRE has been compiled to use the heap instead of the stack for recursion,
2439    the value returned is the size of each block that is obtained from the heap.
2440    .
2441    .
2442  .\" HTML <a name="dfamatch"></a>  .\" HTML <a name="dfamatch"></a>
2443  .SH "MATCHING A PATTERN: THE ALTERNATIVE FUNCTION"  .SH "MATCHING A PATTERN: THE ALTERNATIVE FUNCTION"
2444  .rs  .rs
# Line 2618  Cambridge CB2 3QH, England. Line 2644  Cambridge CB2 3QH, England.
2644  .rs  .rs
2645  .sp  .sp
2646  .nf  .nf
2647  Last updated: 17 January 2012  Last updated: 21 January 2012
2648  Copyright (c) 1997-2012 University of Cambridge.  Copyright (c) 1997-2012 University of Cambridge.
2649  .fi  .fi

Legend:
Removed from v.887  
changed lines
  Added in v.901

  ViewVC Help
Powered by ViewVC 1.1.5