Commit 6224ceb
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 79e6805 commit 6224ceb
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1684 | 1684 | | |
1685 | 1685 | | |
1686 | 1686 | | |
1687 | | - | |
| 1687 | + | |
1688 | 1688 | | |
1689 | 1689 | | |
1690 | 1690 | | |
1691 | 1691 | | |
1692 | 1692 | | |
1693 | 1693 | | |
1694 | | - | |
| 1694 | + | |
1695 | 1695 | | |
1696 | 1696 | | |
1697 | 1697 | | |
| |||
0 commit comments