Where is the source code for mmap function? [closed]
-
19-04-2021 - |
Question
So I was searching for sys/mman.h and ideally sys/mman.c in https://opensource.apple.com/source/Libc/Libc-1244.20.1/ and didn't find it. Any idea why? Where could I find the source?
Solution
I assume you mean mmap.c - you can find the source files here:
https://github.com/apple/darwin-xnu/blob/5394bb038891708cd4ba748da79b90a33b19f82e/libsyscall/wrappers/unix03/mmap.c https://github.com/apple/darwin-xnu/blob/master/bsd/sys/mman.h
The kernel part of the implementation where the functionality actually lies can be found here:
Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange