PCRE2_SET_RECURSION_MEMORY_MANAGEMENT(3)
β¨ PCRE2_SET_RECURSION_MEMORY_MANAGEMENT β¨
okay so bestie, real talk β welcome to the pcre2_set_recursion_memory_management page π
it lives in the Library Functions Manual (the fancy section of the manual, iykyk), and it's part of PCRE2, aka Perl-compatible regular expressions (revised API). she's iconic, she's historic, she'sβ¦ mostly retired. let's get into it π
πΈ NAME πΈ
PCRE2 β Perl-compatible regular expressions (revised API). that's the whole name section, short and slay π
π¦ SYNOPSIS π¦
okay so here's the actual signature, copy it exactly, no cap:
#include <pcre2.h>
int pcre2_set_recursion_memory_management(
pcre2_match_context *mcontext,
void *(*private_malloc)(size_t, void *),
void (*private_free)(void *, void *), void *memory_data);
like, she looks like she takes four whole arguments and does something important. she does not. keep reading π
π DESCRIPTION π
THE BIG NEWS: from release 10.30 onwards, this function is obsolete and literally does nothing. absolutely zero. no cap. π«Ά
the result is always zero β that's the one thing you can count on her for, bestie. she's giving retiree-at-the-function-party energy π
so like, if you're calling this expecting it to set up any recursion memory managementβ¦ she's not doing that. she hasn't been doing that since 10.30. it's giving "washed up but still on the guest list" honestly π
β reminder: the return value is always zero. yes, even then. even if you're sure. always zero. β¨
want the actual tea on how PCRE2 works? there's a complete description of the PCRE2 native API over on the pcre2api page, and a description of the POSIX API on the pcre2posix page. go read those, they ate π₯
π SEE ALSO π
pcre2apiβ the complete description of the PCRE2 native API πpcre2posixβ the description of the POSIX API π¦
kk that's the whole page, you're officially educated π
stay hydrated, go read pcre2api, and remember: if some code is calling pcre2_set_recursion_memory_management expecting it to do something, it's gonna get a zero and a vibe check π
mwah π β this has been PCRE2 10.47, dated 23 January 2023, signing off from the Library Functions Manual. periodt π
π¦ 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