3 ms·
Take a look at vm.max_map_count. A lot of systems have that set artificially low and that will force a memory allocator to fail and return NULL. I can confirm t
by nyc_pizzadev 6y ago
Take a look at vm.max_map_count. A lot of systems have that set artificially low and that will force a memory allocator to fail and return NULL. I can confirm this is the case for jemalloc.
Also, on Linux, only 48 of 64 bits are available for VM addressing. That leaves you with about 250TB of address space. Seems like a lot until you start using VM for disk mmaps. I have actually seen this limit hit.
- moonchild 6y ago> on Linux, only 48 of 64 bits are available for VM That is on amd64, not linux. And arm does the same thing. (It's also 256tb, not 250tb.) Newer intel cpus use 5-level paging[1], which gives you 128pb VM. 1. https://en.wikipedia.org/wiki/Intel_5-level_paging https://en.wikipedia.org/wiki/Intel_5-level_paging
- fulafel 6y agoAlso it's 48-bit just on current amd64 chips, it's not an architectural amd64 property - your binary is compatible with >48bit VA space of the future (unless you yourself misguidedly bake the 48-bit assumption into it). But I guess the point was to point out lower bounds.
- moonchild 6y agoRight; hence the mention of intel 5-level paging with 56-bit virtual address space.