Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 1 | .TH PCRE2_JIT_STACK_CREATE 3 "24 March 2017" "PCRE2 10.30" |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 2 | .SH NAME |
| 3 | PCRE2 - 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 |
| 17 | This function is used to create a stack for use by the code compiled by the JIT |
| 18 | compiler. The first two arguments are a starting size for the stack, and a |
| 19 | maximum size to which it is allowed to grow. The final argument is a general |
| 20 | context, for memory allocation functions, or NULL for standard memory |
| 21 | allocation. 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 Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 23 | which can then be processed by \fBpcre2_match()\fP or \fBpcre2_jit_match()\fP. |
Elliott Hughes | 653c210 | 2019-01-09 15:41:36 -0800 | [diff] [blame] | 24 | A maximum stack size of 512KiB to 1MiB should be more than enough for any |
Elliott Hughes | 4e19c8e | 2022-04-15 15:11:02 -0700 | [diff] [blame] | 25 | pattern. If the stack couldn't be allocated or the values passed were not |
| 26 | reasonable, NULL will be returned. For more details, see the |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 27 | .\" HREF |
| 28 | \fBpcre2jit\fP |
| 29 | .\" |
| 30 | page. |
| 31 | .P |
| 32 | There is a complete description of the PCRE2 native API in the |
| 33 | .\" HREF |
| 34 | \fBpcre2api\fP |
| 35 | .\" |
| 36 | page and a description of the POSIX API in the |
| 37 | .\" HREF |
| 38 | \fBpcre2posix\fP |
| 39 | .\" |
| 40 | page. |