1PCRE2_JIT_STACK_ASSIGN(3) Library Functions Manual PCRE2_JIT_STACK_ASSIGN(3)
2
3
4
6 PCRE2 - Perl-compatible regular expressions (revised API)
7
9
10 #include <pcre2.h>
11
12 void pcre2_jit_stack_assign(pcre2_match_context *mcontext,
13 pcre2_jit_callback callback_function, void *callback_data);
14
16
17 This function provides control over the memory used by JIT as a run-
18 time stack when pcre2_match() or pcre2_jit_match() is called with a
19 pattern that has been successfully processed by the JIT compiler. The
20 information that determines which stack is used is put into a match
21 context that is subsequently passed to a matching function. The argu‐
22 ments of this function are:
23
24 mcontext a pointer to a match context
25 callback a callback function
26 callback_data a JIT stack or a value to be passed to the callback
27
28 If mcontext is NULL, the function returns immediately, without doing
29 anything.
30
31 If callback is NULL and callback_data is NULL, an internal 32KiB block
32 on the machine stack is used.
33
34 If callback is NULL and callback_data is not NULL, callback_data must
35 be a valid JIT stack, the result of calling pcre2_jit_stack_create().
36
37 If callback not NULL, it is called with callback_data as an argument at
38 the start of matching, in order to set up a JIT stack. If the result is
39 NULL, the internal 32KiB stack is used; otherwise the return value must
40 be a valid JIT stack, the result of calling pcre2_jit_stack_create().
41
42 You may safely use the same JIT stack for multiple patterns, as long as
43 they are all matched in the same thread. In a multithread application,
44 each thread must use its own JIT stack. For more details, see the
45 pcre2jit page.
46
47 There is a complete description of the PCRE2 native API in the pcre2api
48 page and a description of the POSIX API in the pcre2posix page.
49
50
51
52PCRE2 10.32 28 June 2018 PCRE2_JIT_STACK_ASSIGN(3)