/[pcre]/code/tags/pcre-7.2/doc/pcrestack.3
ViewVC logotype

Diff of /code/tags/pcre-7.2/doc/pcrestack.3

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

revision 93 by nigel, Sat Feb 24 21:41:42 2007 UTC revision 182 by ph10, Wed Jun 13 15:09:54 2007 UTC
# Line 52  frame for each matched character. For a Line 52  frame for each matched character. For a
52  required. Consider now this rewritten pattern, which matches exactly the same  required. Consider now this rewritten pattern, which matches exactly the same
53  strings:  strings:
54  .sp  .sp
55    ([^<]++|<(?!inet))    ([^<]++|<(?!inet))+
56  .sp  .sp
57  This uses very much less stack, because runs of characters that do not contain  This uses very much less stack, because runs of characters that do not contain
58  "<" are "swallowed" in one item inside the parentheses. Recursion happens only  "<" are "swallowed" in one item inside the parentheses. Recursion happens only
# Line 72  the Line 72  the
72  .\" HREF  .\" HREF
73  \fBpcrebuild\fP  \fBpcrebuild\fP
74  .\"  .\"
75  documentation.  documentation. When built in this way, instead of using the stack, PCRE obtains
76    and frees memory by calling the functions that are pointed to by the
77    \fBpcre_stack_malloc\fP and \fBpcre_stack_free\fP variables. By default, these
78    point to \fBmalloc()\fP and \fBfree()\fP, but you can replace the pointers to
79    cause PCRE to use your own functions. Since the block sizes are always the
80    same, and are always freed in reverse order, it may be possible to implement
81    customized memory handlers that are more efficient than the standard functions.
82  .P  .P
83  In Unix-like environments, there is not often a problem with the stack unless  In Unix-like environments, there is not often a problem with the stack unless
84  very long strings are involved, though the default limit on stack size varies  very long strings are involved, though the default limit on stack size varies
# Line 113  recursion. Thus, if you want to limit yo Line 119  recursion. Thus, if you want to limit yo
119  should set the limit at 16000 recursions. A 64Mb stack, on the other hand, can  should set the limit at 16000 recursions. A 64Mb stack, on the other hand, can
120  support around 128000 recursions. The \fBpcretest\fP test program has a command  support around 128000 recursions. The \fBpcretest\fP test program has a command
121  line option (\fB-S\fP) that can be used to increase the size of its stack.  line option (\fB-S\fP) that can be used to increase the size of its stack.
122  .P  .
123  .in 0  .
124  Last updated: 14 September 2006  .SH AUTHOR
125  .br  .rs
126  Copyright (c) 1997-2006 University of Cambridge.  .sp
127    .nf
128    Philip Hazel
129    University Computing Service
130    Cambridge CB2 3QH, England.
131    .fi
132    .
133    .
134    .SH REVISION
135    .rs
136    .sp
137    .nf
138    Last updated: 05 June 2007
139    Copyright (c) 1997-2007 University of Cambridge.
140    .fi

Legend:
Removed from v.93  
changed lines
  Added in v.182

  ViewVC Help
Powered by ViewVC 1.1.5