News for hackers. Stuff that matters.
Re:Kirc – A tiny IRC client written in POSIX C99 by nyc_pizzadev on Wednesday September 16, 2020 @05:02PM (#24497865)
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.

Re:Kirc – A tiny IRC client written in POSIX C99 by moonchild on Wednesday September 16, 2020 @06:03PM (#24498524)
> 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

Re:Kirc – A tiny IRC client written in POSIX C99 by fulafel on Thursday September 17, 2020 @12:22AM (#24501162)
Also 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.
Re:Kirc – A tiny IRC client written in POSIX C99 by moonchild on Thursday September 17, 2020 @03:01AM (#24501912)
Right; hence the mention of intel 5-level paging with 56-bit virtual address space.