This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In Perl_pad_new(), allocate a 2 element array for padlist.
authorNicholas Clark <nick@ccl4.org>
Tue, 16 Nov 2010 11:42:01 +0000 (11:42 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 16 Nov 2010 11:42:01 +0000 (11:42 +0000)
commit7a6072a8e020194545ae918018728beca4bd5e3b
tree4ffa86f8cbadfc346dc6fe386e97a20395bc2e7d
parent403799bf19538009b2d9e762e57456168d29ca0e
In Perl_pad_new(), allocate a 2 element array for padlist.

Most subroutines never recurse, hence only need 2 entries in the padlist
array - names, and depth=1.  The default for av_store() is to allocate 0..3,
and even an explicit call to av_extend() with <3 will be rounded up, so we
inline the allocation of the array here.

Running ./installman allocates 7K less with this change.
pad.c