You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
S_invlist_trim - don't SvPV_renew where no change is likely
Currently, `S_invlist_trim` always calls `SvPV_renew(invlist, <size>)`,
which is a macro wrapping a call to `safesysrealloc()`.
However, `SvLEN(invlist)` is often already exactly the desired size, or
it is larger by less than the size of a pointer. With this commit, the
new `expected_size` macro is used to reduce the number of cases in which
S_invlist_trim will try to shrink a buffer but no shrinkage is likely to
occur. (For example, if the desired size is less than the minimum actual
allocation size.)
0 commit comments