Hacker News new | ask | show | jobs
by jart 1444 days ago
malloc() isn't part of the Linux API which provides mmap().
2 comments

Libc being just a library is indeed one of the ways that Linux is unlike Unix.
What do you mean by "Unix"? Are you talking about some specific Unix version, or is there something in the POSIX spec that says that libc isn't a library?
It's not that libc is supposed to not be a library, but those functions are the POSIX-defined interfaces to the OS. Linux is unusual in that it defines its stable interfaces in terms of the syscall ABI, enabling different implementations of the libc that can work semi-reliably across kernel versions.
Since we are getting pedantic, Linux isn't a UNIX.
It's absurd you would call someone pedantic for saying malloc is in a library on linux after trying to say that malloc in a library on windows.
> Linux isn't a UNIX

I think this isn't quite right - I think some distributions are actually certified as UNIX.

https://www.opengroup.org/openbrand/register/

I thought it was. Some distro (I forget the name) paid to be certified with The Open Group.