[Rpm-maint] [rpm-software-management/rpm] Use xcalloc() instead of open-coded arithmetic (PR #1900)
Panu Matilainen
notifications at github.com
Wed Jan 26 08:53:30 UTC 2022
calloc() is significantly more expensive than malloc(), and these happen for every single package for non-trivial quantities of memory. A far subtler and generally useful hammer would be introducing + using a malloc() variant that takes calloc()-style arguments (similar to glibc reallocarray()) and failure semantics. There are some 160 malloc call-sites in rpm, and large number of them are performing arithmetics for the allocation size...
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1900#issuecomment-1021989356
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/1900/c1021989356 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220126/49db9f43/attachment.html>
More information about the Rpm-maint
mailing list