diff options
author | Karl Williamson <khw@cpan.org> | 2016-02-23 14:04:19 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-02-23 23:59:31 -0700 |
commit | accb4364d92e26c20e6a538fc04d1af52a8b94e2 (patch) | |
tree | edf0a599fab750094017b7dd39a7a6aa8f35f020 /proto.h | |
parent | f0c0c5adc5daeb0fbad1b23dca12ba5c46560a16 (diff) | |
download | perl-accb4364d92e26c20e6a538fc04d1af52a8b94e2.tar.gz |
Use less memory in compiling regexes
This is at least a partial patch for [perl #127392], cutting the maximum
memory used on my box from around 8600kB to 7800kB. For [perl #127568],
which has been merged into #127392, the savings are even larger, about
37%
Previously a large number of large mortal SVs could be created while
compiling a single regex pattern, and their accumulated memory quickly
added up. This changes things to not use so many mortals.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3664,6 +3664,9 @@ PERL_STATIC_INLINE IV S_invlist_previous_index(SV* const invlist) #define PERL_ARGS_ASSERT_INVLIST_PREVIOUS_INDEX \ assert(invlist) +STATIC void S_invlist_replace_list(pTHX_ SV *dest, SV *src); +#define PERL_ARGS_ASSERT_INVLIST_REPLACE_LIST \ + assert(dest); assert(src) PERL_STATIC_INLINE void S_invlist_set_previous_index(SV* const invlist, const IV index); #define PERL_ARGS_ASSERT_INVLIST_SET_PREVIOUS_INDEX \ assert(invlist) |