--- code/trunk/doc/html/pcrebuild.html 2007/02/24 21:40:03 63 +++ code/trunk/doc/html/pcrebuild.html 2007/02/24 21:40:30 73 @@ -14,6 +14,8 @@
  • POSIX MALLOC USAGE
  • LIMITING PCRE RESOURCE USAGE
  • HANDLING VERY LARGE PATTERNS +
  • AVOIDING EXCESSIVE STACK USAGE +
  • USING EBCDIC CODE
    PCRE BUILD-TIME OPTIONS

    @@ -142,7 +144,46 @@ 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.

    +
    AVOIDING EXCESSIVE STACK USAGE

    -Last updated: 21 January 2003 +PCRE implements backtracking while matching by making recursive calls to an +internal function called match(). 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 configure command. With this configuration, PCRE will use the +pcre_stack_malloc and pcre_stack_free 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 malloc() and +free() functions. PCRE runs noticeably more slowly when built in this +way. +

    +
    USING EBCDIC CODE
    +

    +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 configure command. +

    +

    +Last updated: 09 December 2003
    Copyright © 1997-2003 University of Cambridge.