Hacker News new | past | comments | ask | show | jobs | submit login

There is no Windows malloc(). Only UNIXes have the C API as part of the OS API.



malloc() is defined by the C Standard. If you want to claim your compiler is ANSI or ISO certified, you need to support malloc() (as well as the rest of the C Standard library).


Quite right, except we are then talking about compilers and not OS APIs.

UNIXes are the only OSes were there is an overlapping between OS APIs and libc due to C's origin.


malloc() isn't part of the Linux API which provides mmap().


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.


[flagged]


Why are you calling me your "dear". Don't ever talk to me that way again.


> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: