diff --git a/regex.tal b/regex.tal index c8583e9..1ea2849 100644 --- a/regex.tal +++ b/regex.tal @@ -408,6 +408,10 @@ ( ) ( the stack can be cleared using ;reset-stack, which resets ) ( the stack pointers but does not zero out any memory. ) +( ) +( stack size is 4096 bytes here but is configurable. ) +( in some cases it could be very small but this will limit ) +( how many branches can be parsed and executed. ) ( push 4 bytes onto the stack ) @push4 ( str* regex* -> ) @@ -466,6 +470,10 @@ ( the arena is used to allocate regex graph nodes, which are ) ( dynamically-allocated as the regex string is parsed. once ) ( a regex is no longer needed the arena may be reclaimed. ) +( ) +( arena size is 1024 bytes here but is configurable. ) +( smaller sizes would likely be fine but will limit the ) +( overall complexity of regexes to be parsed and executed. ) ( reclaim all the memory used by the arena ) @reset-arena ( -> )