| 14 |
<li><a name="TOC5" href="#SEC5">POSIX MALLOC USAGE</a> |
<li><a name="TOC5" href="#SEC5">POSIX MALLOC USAGE</a> |
| 15 |
<li><a name="TOC6" href="#SEC6">LIMITING PCRE RESOURCE USAGE</a> |
<li><a name="TOC6" href="#SEC6">LIMITING PCRE RESOURCE USAGE</a> |
| 16 |
<li><a name="TOC7" href="#SEC7">HANDLING VERY LARGE PATTERNS</a> |
<li><a name="TOC7" href="#SEC7">HANDLING VERY LARGE PATTERNS</a> |
| 17 |
|
<li><a name="TOC8" href="#SEC8">AVOIDING EXCESSIVE STACK USAGE</a> |
| 18 |
|
<li><a name="TOC9" href="#SEC9">USING EBCDIC CODE</a> |
| 19 |
</ul> |
</ul> |
| 20 |
<br><a name="SEC1" href="#TOC1">PCRE BUILD-TIME OPTIONS</a><br> |
<br><a name="SEC1" href="#TOC1">PCRE BUILD-TIME OPTIONS</a><br> |
| 21 |
<P> |
<P> |
| 144 |
using UTF-8) will fail. Part of the output of these tests is a representation |
using UTF-8) will fail. Part of the output of these tests is a representation |
| 145 |
of the compiled pattern, and this changes with the link size. |
of the compiled pattern, and this changes with the link size. |
| 146 |
</P> |
</P> |
| 147 |
|
<br><a name="SEC8" href="#TOC1">AVOIDING EXCESSIVE STACK USAGE</a><br> |
| 148 |
<P> |
<P> |
| 149 |
Last updated: 21 January 2003 |
PCRE implements backtracking while matching by making recursive calls to an |
| 150 |
|
internal function called <b>match()</b>. In environments where the size of the |
| 151 |
|
stack is limited, this can severely limit PCRE's operation. (The Unix |
| 152 |
|
environment does not usually suffer from this problem.) An alternative approach |
| 153 |
|
that uses memory from the heap to remember data, instead of using recursive |
| 154 |
|
function calls, has been implemented to work round this problem. If you want to |
| 155 |
|
build a version of PCRE that works this way, add |
| 156 |
|
</P> |
| 157 |
|
<P> |
| 158 |
|
<pre> |
| 159 |
|
--disable-stack-for-recursion |
| 160 |
|
</PRE> |
| 161 |
|
</P> |
| 162 |
|
<P> |
| 163 |
|
to the <b>configure</b> command. With this configuration, PCRE will use the |
| 164 |
|
<b>pcre_stack_malloc</b> and <b>pcre_stack_free</b> variables to call memory |
| 165 |
|
management functions. Separate functions are provided because the usage is very |
| 166 |
|
predictable: the block sizes requested are always the same, and the blocks are |
| 167 |
|
always freed in reverse order. A calling program might be able to implement |
| 168 |
|
optimized functions that perform better than the standard <b>malloc()</b> and |
| 169 |
|
<b>free()</b> functions. PCRE runs noticeably more slowly when built in this |
| 170 |
|
way. |
| 171 |
|
</P> |
| 172 |
|
<br><a name="SEC9" href="#TOC1">USING EBCDIC CODE</a><br> |
| 173 |
|
<P> |
| 174 |
|
PCRE assumes by default that it will run in an environment where the character |
| 175 |
|
code is ASCII (or UTF-8, which is a superset of ASCII). PCRE can, however, be |
| 176 |
|
compiled to run in an EBCDIC environment by adding |
| 177 |
|
</P> |
| 178 |
|
<P> |
| 179 |
|
<pre> |
| 180 |
|
--enable-ebcdic |
| 181 |
|
</PRE> |
| 182 |
|
</P> |
| 183 |
|
<P> |
| 184 |
|
to the <b>configure</b> command. |
| 185 |
|
</P> |
| 186 |
|
<P> |
| 187 |
|
Last updated: 09 December 2003 |
| 188 |
<br> |
<br> |
| 189 |
Copyright © 1997-2003 University of Cambridge. |
Copyright © 1997-2003 University of Cambridge. |