diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-07-05 22:51:50 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-08-05 02:23:28 -0700 |
commit | c82ecf346a8512f22f25188e450d92938c245421 (patch) | |
tree | 4a8a85a9655bcb136136674dc3f838204bc9d202 /scope.c | |
parent | 38be3d0038ef87b22af88f80db1fbeb0292ce53b (diff) | |
download | perl-c82ecf346a8512f22f25188e450d92938c245421.tar.gz |
[perl #117855] Store CopFILEGV in a pad under ithreads
This saves having to allocate a separate string buffer for every cop
(control op; every statement has one).
Under non-threaded builds, every cop has a pointer to the GV for that
source file, namely *{"_<filename"}.
Under threaded builds, the name of the GV used to be stored instead.
Now we store an offset into the per-interpreter PL_filegvpad, which
points to the GV.
This makes no significant speed difference, but it reduces mem-
ory usage.
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1231,6 +1231,11 @@ Perl_leave_scope(pTHX_ I32 base) case SAVEt_READONLY_OFF: SvREADONLY_off(ARG0_SV); break; +#ifdef USE_ITHREADS + case SAVEt_COPFILEFREE: + CopFILE_free((COP *)ARG0_PTR); + break; +#endif default: Perl_croak(aTHX_ "panic: leave_scope inconsistency %u", type); } |