Commit c6b821f
committed
Add Perl_expected_size stub macro
Passed a number of bytes, this macro will return:
* PERL_STRLEN_NEW_MIN if that is larger than the argument value
* the argument value rounded up to PTRSIZE
The intention is to later convert `Perl_expected_size` into a
function that has some knowledge of the underlying malloc library's
behaviour and can return values more reflective of the actual
useable allocation size for the specified number of bytes.
This can aid in reducing unnecessary calls to realloc().1 parent 89b92b6 commit c6b821f
3 files changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1193 | 1193 | | |
1194 | 1194 | | |
1195 | 1195 | | |
| 1196 | + | |
1196 | 1197 | | |
1197 | 1198 | | |
1198 | 1199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1687 | 1687 | | |
1688 | 1688 | | |
1689 | 1689 | | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
1690 | 1707 | | |
1691 | 1708 | | |
1692 | 1709 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments