--- code/trunk/doc/pcrebuild.3 2007/02/24 21:40:03 63 +++ code/trunk/doc/pcrebuild.3 2007/02/24 21:40:30 73 @@ -106,7 +106,40 @@ using UTF-8) will fail. Part of the output of these tests is a representation of the compiled pattern, and this changes with the link size. +.SH AVOIDING EXCESSIVE STACK USAGE +.rs +.sp +PCRE implements backtracking while matching by making recursive calls to an +internal function called \fBmatch()\fR. In environments where the size of the +stack is limited, this can severely limit PCRE's operation. (The Unix +environment does not usually suffer from this problem.) An alternative approach +that uses memory from the heap to remember data, instead of using recursive +function calls, has been implemented to work round this problem. If you want to +build a version of PCRE that works this way, add + + --disable-stack-for-recursion + +to the \fBconfigure\fR command. With this configuration, PCRE will use the +\fBpcre_stack_malloc\fR and \fBpcre_stack_free\fR variables to call memory +management functions. Separate functions are provided because the usage is very +predictable: the block sizes requested are always the same, and the blocks are +always freed in reverse order. A calling program might be able to implement +optimized functions that perform better than the standard \fBmalloc()\fR and +\fBfree()\fR functions. PCRE runs noticeably more slowly when built in this +way. + +.SH USING EBCDIC CODE +.rs +.sp +PCRE assumes by default that it will run in an environment where the character +code is ASCII (or UTF-8, which is a superset of ASCII). PCRE can, however, be +compiled to run in an EBCDIC environment by adding + + --enable-ebcdic + +to the \fBconfigure\fR command. + .in 0 -Last updated: 21 January 2003 +Last updated: 09 December 2003 .br Copyright (c) 1997-2003 University of Cambridge.