I'm a total beginner in PCRE2, now I'm "playing" with the code.
I reviewed the man pages and documentation. If I'm not mistaken, PCRE2
supports JIT (on most popular architectures - eg. AMD64), but the user has
to turn it on.
The pcre2jit man page says
*In some circumstances you may need to call additional functions. These are
described in the section entitled "Controlling the JIT stack" below.*
Is there any way to decide, in which case do I need to use those functions?
I mean the patterns are totally unknown to me, it could be very complex or
can be very simple.
Now I try this solution:
I chose 1MB, because man page says
*A maximum stack size of 512KiB to 1MiB should be more than enough for any
Do I need to add the manual stack allocation? Or would be enough just
simple call the
and if the call fails, then match won't use JIT - but the application won't
pcre2_jit_stack_create(1, 1024 * 1024, NULL);
allocates the whole 1MB of memory? I just ask, because I showed some
details about compiled regex in that code, and it says:
The PCRE2_INFO_JITSIZE: 76976 means it uses almost 77kB of 1MB, but the 1MB
has been allocated? So if I have 200 regexes, then it means the application
needs +200MB memory?
Thanks for your helps,
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev