blob: d332b72d7cdc733e2fbafdd93a6e6d7c1a38f234 [file] [log] [blame]
Elliott Hughes9bc971b2018-07-27 13:23:14 -07001.TH PCRE2_JIT_STACK_CREATE 3 "24 March 2017" "PCRE2 10.30"
Janis Danisevskis112c9cc2016-03-31 13:35:25 +01002.SH NAME
3PCRE2 - Perl-compatible regular expressions (revised API)
4.SH SYNOPSIS
5.rs
6.sp
7.B #include <pcre2.h>
8.PP
9.nf
10.B pcre2_jit_stack *pcre2_jit_stack_create(PCRE2_SIZE \fIstartsize\fP,
11.B " PCRE2_SIZE \fImaxsize\fP, pcre2_general_context *\fIgcontext\fP);"
12.fi
13.
14.SH DESCRIPTION
15.rs
16.sp
17This function is used to create a stack for use by the code compiled by the JIT
18compiler. The first two arguments are a starting size for the stack, and a
19maximum size to which it is allowed to grow. The final argument is a general
20context, for memory allocation functions, or NULL for standard memory
21allocation. The result can be passed to the JIT run-time code by calling
22\fBpcre2_jit_stack_assign()\fP to associate the stack with a compiled pattern,
Elliott Hughes9bc971b2018-07-27 13:23:14 -070023which can then be processed by \fBpcre2_match()\fP or \fBpcre2_jit_match()\fP.
Elliott Hughes653c2102019-01-09 15:41:36 -080024A maximum stack size of 512KiB to 1MiB should be more than enough for any
Elliott Hughes4e19c8e2022-04-15 15:11:02 -070025pattern. If the stack couldn't be allocated or the values passed were not
26reasonable, NULL will be returned. For more details, see the
Janis Danisevskis112c9cc2016-03-31 13:35:25 +010027.\" HREF
28\fBpcre2jit\fP
29.\"
30page.
31.P
32There is a complete description of the PCRE2 native API in the
33.\" HREF
34\fBpcre2api\fP
35.\"
36page and a description of the POSIX API in the
37.\" HREF
38\fBpcre2posix\fP
39.\"
40page.