Opened 5 years ago
Closed 3 years ago
#1675 closed defect (fixed)
Maximum heap size is limited on 64-bit machines
Reported by: | felix winkelmann | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 5.3 |
Component: | core libraries | Version: | 5.1.0 |
Keywords: | Cc: | ||
Estimated difficulty: | trivial |
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.
Attachments (1)
Change History (9)
comment:1 Changed 5 years ago by
Milestone: | 5.2 → 5.3 |
---|
comment:2 Changed 5 years ago by
It's actually the total maximum, which is not changable via command-line options (C_maximal_heap_size
).
comment:3 Changed 5 years ago by
Unless I'm mistaken, that can be overridden with -:m
, see runtime.c
line 1397.
Changed 4 years ago by
Attachment: | 0001-Increase-maximum-heap-size-on-64-bit-machines.patch added |
---|
comment:6 follow-up: 7 Changed 3 years ago by
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...)
comment:7 Changed 3 years ago by
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.
comment:8 Changed 3 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed by 0879e31f6181bfe87484ffbbec90b38bf9f728cd.
I don't think this is needed for 5.2.0; it's only the default value, which can be easily overridden.