Summary
Maximum heap size is limited on 64-bit machines
Metadata
- Id: 7f6cf725df868945989b91cb3706325d6a3061a7
- Trac id: 1675
- Type: defect
- Reporter: felix
- Owner:
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty: trivial
- Resolution: fixed
- Priority: minor
- Milestone: 5.3
- Version: 5.1.0
- Changetime: 2021-05-20 22:22:22 UTC
- Created: 2020-02-04 09:50:30 UTC
- Keywords:
Attachments
- 7f6cf725df868945989b91cb3706325d6a3061a7/attachments/0001-Increase-maximum-heap-size-on-64-bit-machines.patch
Description
`DEFAULT_MAXIMAL_HEAP_SIZE` is set to 0x7ffffff0, which seems to be a 32-bit legacy. I guess it would be appropriate to use 0x7ffffffffffffff0 if `C_SIXTY_FOUR` is defined.
Changes and comments
[2020-02-09 15:38:11 UTC] sjamaan changed milestone from 5.2 to 5.3
[2020-02-09 15:38:11 UTC] sjamaan wrote:
I don't think this is needed for 5.2.0; it's only the default value, which can be easily overridden.
[2020-02-09 20:00:31 UTC] felix wrote:
It's actually the total maximum, which is not changable via command-line options (`C_maximal_heap_size`).
[2020-02-09 22:00:16 UTC] sjamaan wrote:
Unless I'm mistaken, that can be overridden with `-:m`, see `runtime.c` line 1397.
[2020-02-10 15:26:59 UTC] felix wrote:
Yes, I totally overlooked that, for some reason.
[2021-04-10 19:43:30 UTC] dieggsy wrote:
This might be silly but here's a patch
[2021-04-11 04:05:54 UTC] dieggsy attached 0001-Increase-maximum-heap-size-on-64-bit-machines.patch (description=#f)
[2021-05-20 10:58:18 UTC] sjamaan wrote:
I'm not sure this new constant is a sane value - it's 9 exabyte if I'm not mistaken. No machine available today has that kind of memory (and it will probably take a lot of time before any machine will - though if you include swap that day might be closer than we think).
What's the original purpose of the maximal heap size? It being 2GB on 32-bit systems seems to be half the maximum addressable size (which makes sense if you consider that the maximum heap would be double that, but also a little pointless because at that point you'll have eaten up all memory anyway - that memory won't typically all be available. Except there's swap...)
[2021-05-20 12:18:58 UTC] felix wrote:
Replying to sjamaan: > What's the original purpose of the maximal heap size? It being 2GB on 32-bit systems seems to be half the maximum addressable size (which makes sense if you consider that the maximum heap would be double that, but also a little pointless because at that point you'll have eaten up all memory anyway - that memory won't typically all be available. Except there's swap...)
This is only a theoretical limit, to be used to mask out significant bits from the header value, not a commitment on the heap size we want to support. 2GB seemed insane a while ago. And we all know that 640KB is more than enough.
[2021-05-20 22:22:22 UTC] mario set resolution to fixed
[2021-05-20 22:22:22 UTC] mario wrote:
Fixed by 0879e31f6181bfe87484ffbbec90b38bf9f728cd.