/[pcre]/code/trunk/doc/html/pcreperform.html
ViewVC logotype

Diff of /code/trunk/doc/html/pcreperform.html

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

revision 506 by ph10, Thu Mar 8 16:53:09 2007 UTC revision 507 by ph10, Wed Mar 10 16:08:01 2010 UTC
# Line 21  time. The way you express your pattern a Line 21  time. The way you express your pattern a
21  of them.  of them.
22  </P>  </P>
23  <br><b>  <br><b>
24  MEMORY USAGE  COMPILED PATTERN MEMORY USAGE
25  </b><br>  </b><br>
26  <P>  <P>
27  Patterns are compiled by PCRE into a reasonably efficient byte code, so that  Patterns are compiled by PCRE into a reasonably efficient byte code, so that
28  most simple patterns do not use much memory. However, there is one case where  most simple patterns do not use much memory. However, there is one case where
29  memory usage can be unexpectedly large. When a parenthesized subpattern has a  the memory usage of a compiled pattern can be unexpectedly large. If a
30  quantifier with a minimum greater than 1 and/or a limited maximum, the whole  parenthesized subpattern has a quantifier with a minimum greater than 1 and/or
31  subpattern is repeated in the compiled code. For example, the pattern  a limited maximum, the whole subpattern is repeated in the compiled code. For
32    example, the pattern
33  <pre>  <pre>
34    (abc|def){2,4}    (abc|def){2,4}
35  </pre>  </pre>
# Line 73  speed is acceptable, this kind of rewrit Line 74  speed is acceptable, this kind of rewrit
74  that PCRE cannot otherwise handle.  that PCRE cannot otherwise handle.
75  </P>  </P>
76  <br><b>  <br><b>
77    STACK USAGE AT RUN TIME
78    </b><br>
79    <P>
80    When <b>pcre_exec()</b> is used for matching, certain kinds of pattern can cause
81    it to use large amounts of the process stack. In some environments the default
82    process stack is quite small, and if it runs out the result is often SIGSEGV.
83    This issue is probably the most frequently raised problem with PCRE. Rewriting
84    your pattern can often help. The
85    <a href="pcrestack.html"><b>pcrestack</b></a>
86    documentation discusses this issue in detail.
87    </P>
88    <br><b>
89  PROCESSING TIME  PROCESSING TIME
90  </b><br>  </b><br>
91  <P>  <P>
# Line 164  Cambridge CB2 3QH, England. Line 177  Cambridge CB2 3QH, England.
177  REVISION  REVISION
178  </b><br>  </b><br>
179  <P>  <P>
180  Last updated: 06 March 2007  Last updated: 07 March 2010
181  <br>  <br>
182  Copyright &copy; 1997-2007 University of Cambridge.  Copyright &copy; 1997-2010 University of Cambridge.
183  <br>  <br>
184  <p>  <p>
185  Return to the <a href="index.html">PCRE index page</a>.  Return to the <a href="index.html">PCRE index page</a>.

Legend:
Removed from v.506  
changed lines
  Added in v.507

  ViewVC Help
Powered by ViewVC 1.1.5