PCRE2_SET_MAX_PATTERN_COMPILED_LENGTH(3)
π PCRE2_SET_MAX_PATTERN_COMPILED_LENGTH(3) π
Library Functions Manual girlies, this one's for you π This page is all about setting a compiled-pattern memory limit in a compile context, and yes, it's as niche and iconic as it sounds.
β¨ NAME β¨
PCRE2 - Perl-compatible regular expressions (revised API)
π¦ SYNOPSIS π¦
#include <pcre2.h>
int pcre2_set_max_pattern_compiled_length(
pcre2_compile_context *ccontext, PCRE2_SIZE value);
π DESCRIPTION π
Okay so picture your compile context, bestie. This function sets, inside that compile context, the maximum size β in bytes β for the memory needed to hold the compiled version of a pattern that's using this context.
The result is always zero. No cap. That's just the vibe.
If a pattern that is passed to pcre2_compile() referencing this context needs more memory than that, an error is generated. Boom. Limit exceeded, not slay.
The default is the largest number that a PCRE2_SIZE variable can hold, which is effectively unlimited. So out of the box, it's giving infinite runway β¨
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. Go read those if you want the full lore π«Ά
later, bestie π β this was PCRE2 10.47, dated 09 June 2024, living in the Library Functions Manual; page title PCRE2_SET_MAX_PATTERN_COMPILED_LENGTH(3). πβ¨
π¦ where this page comes from
- fedora 43: pcre2-devel 10.47-1.fc43 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 43: pcre2-devel 10.47-1.fc43 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 44: pcre2-devel 10.47-1.fc44.1 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 44: pcre2-devel 10.47-1.fc44.1 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms