Man page - pcre2_jit_compile(3)
Packages contas this manual
- pcre2_match_data_free(3)
- pcre2_match_context_copy(3)
- pcre2_set_substitute_callout(3)
- pcre2_substring_number_from_name(3)
- pcre2_substitute(3)
- pcre2_converted_pattern_free(3)
- pcre2_convert_context_free(3)
- pcre2_jit_stack_free(3)
- pcre2_compile_context_create(3)
- pcre2_maketables_free(3)
- pcre2_jit_compile(3)
- pcre2_set_depth_limit(3)
- pcre2build(3)
- pcre2_substring_get_bynumber(3)
- pcre2_set_compile_recursion_guard(3)
- pcre2_pattern_convert(3)
- pcre2_substring_free(3)
- pcre2_set_bsr(3)
- pcre2_substring_copy_bynumber(3)
- pcre2_substring_length_bynumber(3)
- pcre2_convert_context_create(3)
- pcre2matching(3)
- pcre2_dfa_match(3)
- pcre2_get_ovector_count(3)
- pcre2pattern(3)
- pcre2limits(3)
- pcre2_compile_context_copy(3)
- pcre2_set_substitute_case_callout(3)
- pcre2_set_glob_separator(3)
- pcre2_get_match_data_size(3)
- pcre2_substring_copy_byname(3)
- pcre2_jit_stack_create(3)
- pcre2sample(3)
- pcre2_compile_context_free(3)
- pcre2_set_heap_limit(3)
- pcre2_set_newline(3)
- pcre2convert(3)
- pcre2(3)
- pcre2_set_callout(3)
- pcre2callout(3)
- pcre2_substring_get_byname(3)
- pcre2unicode(3)
- pcre2_general_context_free(3)
- pcre2_set_offset_limit(3)
- pcre2_code_free(3)
- pcre2_substring_nametable_scan(3)
- pcre2_substring_list_free(3)
- pcre2serialize(3)
- pcre2_set_optimize(3)
- pcre2_set_recursion_limit(3)
- pcre2_set_max_pattern_compiled_length(3)
- pcre2_match_data_create_from_pattern(3)
- pcre2_pattern_info(3)
- pcre2_convert_context_copy(3)
- pcre2partial(3)
- pcre2_serialize_decode(3)
- pcre2syntax(3)
- pcre2_set_max_pattern_length(3)
- pcre2_match_data_create(3)
- pcre2api(3)
- pcre2_set_character_tables(3)
- pcre2_code_copy_with_tables(3)
- pcre2_set_max_varlookbehind(3)
- pcre2_set_parens_nest_limit(3)
- pcre2_match_context_create(3)
- pcre2_jit_match(3)
- pcre2_serialize_encode(3)
- pcre2_general_context_create(3)
- pcre2_config(3)
- pcre2_match_context_free(3)
- pcre2_get_match_data_heapframes_size(3)
- pcre2_set_match_limit(3)
- pcre2_set_glob_escape(3)
- pcre2_substring_list_get(3)
- pcre2_get_ovector_pointer(3)
- pcre2_set_compile_extra_options(3)
- pcre2compat(3)
- pcre2_compile(3)
- pcre2_jit_free_unused_memory(3)
- pcre2_serialize_free(3)
- pcre2_get_error_message(3)
- pcre2_get_startchar(3)
- pcre2posix(3)
- pcre2_get_mark(3)
- pcre2_match(3)
- pcre2demo(3)
- pcre2_substring_length_byname(3)
- pcre2_set_recursion_memory_management(3)
- pcre2_serialize_get_number_of_codes(3)
- pcre2_jit_stack_assign(3)
- pcre2-config(1)
- pcre2jit(3)
- pcre2_code_copy(3)
- pcre2_callout_enumerate(3)
- pcre2_maketables(3)
- pcre2_general_context_copy(3)
- pcre2perform(3)
apt-get install libpcre2-dev
Manual
| PCRE2_JIT_COMPILE(3) | Library Functions Manual | PCRE2_JIT_COMPILE(3) |
NAME
PCRE2 - Perl-compatible regular expressions (revised API)
SYNOPSIS
#include <pcre2.h>
int pcre2_jit_compile(pcre2_code *code, uint32_t options);
DESCRIPTION
This function requests JIT compilation, which, if the just-in-time compiler is available, further processes a compiled pattern into machine code that executes much faster than the pcre2_match() interpretive matching function. Full details are given in the pcre2jit documentation.
The availability of JIT support can be tested by calling pcre2_compile_jit() with a single option PCRE2_JIT_TEST_ALLOC (the code argument is ignored, so a NULL value is accepted). Such a call returns zero if JIT is available and has a working allocator. Otherwise it returns PCRE2_ERROR_NOMEMORY if JIT is available but cannot allocate executable memory, or PCRE2_ERROR_JIT_UNSUPPORTED if JIT support is not compiled.
Otherwise, the first argument must be a pointer that was returned by a successful call to pcre2_compile(), and the second must contain one or more of the following bits:
PCRE2_JIT_COMPLETE compile code for full matching
PCRE2_JIT_PARTIAL_SOFT compile code for soft partial matching
PCRE2_JIT_PARTIAL_HARD compile code for hard partial matching
There is also an obsolete option called PCRE2_JIT_INVALID_UTF, which has been superseded by the pcre2_compile() option PCRE2_MATCH_INVALID_UTF. The old option is deprecated and may be removed in the future.
The yield of the function when called with any of the three options above is 0 for success, or a negative error code otherwise. In particular, PCRE2_ERROR_JIT_BADOPTION is returned if JIT is not supported or if an unknown bit is set in options. The function can also return PCRE2_ERROR_NOMEMORY if JIT is unable to allocate executable memory for the compiler, even if it was because of a system security restriction. In a few cases, the function may return with PCRE2_ERROR_JIT_UNSUPPORTED for unsupported features.
There is a complete description of the PCRE2 native API in the pcre2api page and a description of the POSIX API in the pcre2posix page.
| 22 August 2024 | PCRE2 10.46 |