0

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?

closed as off-topic by fsb, Monomeeth Feb 15 '18 at 3:07

  • This question does not appear to be about Apple hardware or software within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    I'm voting to close this question as off-topic because of two reasons - why Apple does/doesn't do something and finding off site resources are both off topic here. – Allan Feb 10 '18 at 11:30
2

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:

https://github.com/apple/darwin-xnu/blob/5394bb038891708cd4ba748da79b90a33b19f82e/bsd/kern/kern_mman.c

  • Thank you! Apologies for being a bit incessant, but where do I go next? github.com/apple/darwin-xnu/blob/… the __mmap function doesn't seem to have any definition in the file (only declaration) - only a passing occurence in syscalls.map, when I searched the whole xnu sources for __mmap. I'd like to dig into the real wrapperless impl (ideally down to kernel space, I seem to be stuck ;) ) – Novellizator Feb 11 '18 at 11:11
  • 1
    I have added a link to the implementation of the mmap functionality in the kernel. – jksoegaard Feb 11 '18 at 18:36

Not the answer you're looking for? Browse other questions tagged .