-
Notifications
You must be signed in to change notification settings - Fork 576
S_invlist_trim - don't SvPV_renew if SvLEN(invlist) is < PTRSIZE larger #23111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: blead
Are you sure you want to change the base?
Conversation
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, such cases just return without calling `SvPV_renew()`.
Tow comments:
|
S_invlist_trim_pv_shrink_evt_trace.txt There are so many problems with this API, IDK where to start. For example, the same Also "new 0x9" which is Suggestion, why not just turn off ln 50
ln 195
ln 51
ln 1425
Here is a sample of the different kinds of actual sizes/SvLEN values encountered by this API during a
|
Currently,
S_invlist_trim
always callsSvPV_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,
such cases just return without calling
SvPV_renew()
.