summaryrefslogtreecommitdiff
path: root/doc/pcrejit.3
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-09-11 14:31:21 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-09-11 14:31:21 +0000
commit872e41011c69ee598dbdd32444dcde8fa30a23ee (patch)
treebbc0b9c2afdae0e564bc94b160ebf1a9fbe1744f /doc/pcrejit.3
parent3e3345effab1548229f5cf368f19ace0b64d782b (diff)
downloadpcre-872e41011c69ee598dbdd32444dcde8fa30a23ee.tar.gz
Final source and document tidies for 8.20-RC1.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@691 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'doc/pcrejit.3')
-rw-r--r--doc/pcrejit.316
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/pcrejit.3 b/doc/pcrejit.3
index 981cdaa..2500057 100644
--- a/doc/pcrejit.3
+++ b/doc/pcrejit.3
@@ -47,9 +47,9 @@ You have to do two things to make use of the JIT support in the simplest way:
(1) Call \fBpcre_study()\fP with the PCRE_STUDY_JIT_COMPILE option for
each compiled pattern, and pass the resulting \fBpcre_extra\fP block to
\fBpcre_exec()\fP.
-
+.sp
(2) Use \fBpcre_free_study()\fP to free the \fBpcre_extra\fP block when it is
- no longer needed instead of just freeing it yourself. This
+ no longer needed instead of just freeing it yourself. This
ensures that any JIT data is also freed.
.sp
In some circumstances you may need to call additional functions. These are
@@ -149,13 +149,13 @@ is given when there is not enough stack. Three functions are provided for
managing blocks of memory for use as JIT stacks.
.P
The \fBpcre_jit_stack_alloc()\fP function creates a JIT stack. Its arguments
-are a starting size and a maximum size, and it returns a pointer to an opaque
+are a starting size and a maximum size, and it returns a pointer to an opaque
structure of type \fBpcre_jit_stack\fP, or NULL if there is an error. The
\fBpcre_jit_stack_free()\fP function can be used to free a stack that is no
longer needed. (For the technically minded: the address space is allocated by
mmap or VirtualAlloc.)
.P
-JIT uses far less memory for recursion than the interpretive code,
+JIT uses far less memory for recursion than the interpretive code,
and a maximum stack size of 512K to 1M should be more than enough for any
pattern.
.P
@@ -197,10 +197,10 @@ This is a suggestion for how a typical multithreaded program might operate:
.sp
During thread initalization
thread_local_var = pcre_jit_stack_alloc(...)
-
+.sp
During thread exit
pcre_jit_stack_free(thread_local_var)
-
+.sp
Use a one-line callback function
return thread_local_var
.sp
@@ -214,7 +214,7 @@ successful study with PCRE_STUDY_JIT_COMPILE.
.rs
.sp
This is a single-threaded example that specifies a JIT stack without using a
-callback.
+callback.
.sp
int rc;
int ovector[30];
@@ -232,7 +232,7 @@ callback.
/* Check results */
pcre_free(re);
pcre_free_study(extra);
- pcre_jit_stack_free(jit_stack);
+ pcre_jit_stack_free(jit_stack);
.sp
.
.