Commit 46e5ef5
committed
runtime: Fix printing failed allocation amounts.
On LP64 and LLP64 systems, size_t is bigger than unsigned.
Printing the failed allocation as mp_uint_t allows the correct failed
allocation size to be shown.
However, there are occasions where mp_uint_t is bigger than size_t
(nanbox). In that case, preserve the existing code path to avoid
growth in executable size.
Example where this affects the failed allocation message (on x86_64
coverage build):
```
>>> "a" * (1 << 54)
```
Before, this would print the size as 1. Now it prints it as
18014398509481985 (2**54 + 1).
Signed-off-by: Jeff Epler <jepler@gmail.com>1 parent b9143d5 commit 46e5ef5
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1669 | 1669 | | |
1670 | 1670 | | |
1671 | 1671 | | |
1672 | | - | |
| 1672 | + | |
1673 | 1673 | | |
1674 | 1674 | | |
1675 | 1675 | | |
1676 | 1676 | | |
1677 | 1677 | | |
1678 | 1678 | | |
1679 | | - | |
| 1679 | + | |
1680 | 1680 | | |
1681 | 1681 | | |
1682 | 1682 | | |
| |||
0 commit comments