Re:A Fast, Growable Array with Stable Pointers in C
by cornstalks on Wednesday August 06, 2025 @03:23PM
(#44816485)
What kind of setups use over 256 TiB of RAM?
[ Parent
| on HN ]
Re:A Fast, Growable Array with Stable Pointers in C
by TapamN on Wednesday August 06, 2025 @03:38PM
(#44816685)
It not necessarily physical RAM. If you memmap large files, like maybe a large file from RAID or network share, you could still need that much virtual address space.
Re:A Fast, Growable Array with Stable Pointers in C
by Dylan16807 on Friday August 08, 2025 @12:47AM
(#44833523)
Do many programs want to use that much data but not control when it swaps in and out?
Re:A Fast, Growable Array with Stable Pointers in C
by wittystick on Friday August 08, 2025 @08:35PM
(#44843078)
No, but 5-level paging is opt-in anyway, so its presence isn't problematic if assuming a 48-bit address space. Linux won't allocate space outside the 48-bits unless you give an address hint to mmap outside the 48-bit range.
Re:A Fast, Growable Array with Stable Pointers in C
by bonzini on Wednesday August 06, 2025 @03:36PM
(#44816647)
In practice it's over 64 TiB because kernels often use a quarter of the available addressing space (half of the kernel addressing space) to map the physical addresses (e.g. FFFFC000_12345678 maps physical address 0x12345678). So 48 virtual address bits can be used with up to 2^46 bytes of RAM.
Re:A Fast, Growable Array with Stable Pointers in C
by hinkley on Wednesday August 06, 2025 @06:18PM
(#44818525)
And how long has 48 bit addressing been de rigeur? Not so long ago we had processors that could address 40 bits of address space. Or was that 38?
Re:A Fast, Growable Array with Stable Pointers in C
by winocm on Wednesday August 06, 2025 @06:28PM
(#44818601)
At least since maybe the DEC Alpha 21264. It could address 48-bits of VA space, but that comes with caveats due to PALcode specific intricacies.
I think VMS (or was it Tru64?) uses this mode, but many other OSes just use 43-bit or 40-bit addressing. Realistically though, I don’t think many users would be using workloads that addressed more than 38-bits worth of contiguous VA space in 1998-1999.
Re:A Fast, Growable Array with Stable Pointers in C
by loeg on Wednesday August 06, 2025 @07:52PM
(#44819209)
amd64 has had 48-bit addressing / 4-level paging from the beginning.
Re:A Fast, Growable Array with Stable Pointers in C
by hinkley on Thursday August 07, 2025 @07:21PM
(#44831612)
I must be thinking of intel’s failed 64 bit attempts prior to amd64 winning.
Re:A Fast, Growable Array with Stable Pointers in C
by wittystick on Friday August 08, 2025 @08:37PM
(#44843088)
Physical addresses may be limited to 40 bits, but 48-bit virtual addresses have been the norm since 4-level paging.
Re:A Fast, Growable Array with Stable Pointers in C
by bonzini on Wednesday August 13, 2025 @07:09PM
(#44894963)
You're probably thinking of PAE (36 bit physical address space on 32 bit virtual address space). But Intel for quite some time had a 36 bit physical address space limit on 64-bit consumer processors, even if the virtual address space was 48 bits. I think it only changed 5 years ago or less.
Re:A Fast, Growable Array with Stable Pointers in C
by reorder9695 on Wednesday August 06, 2025 @03:29PM
(#44816557)
"640k ought to be enough for anybody"