4 ms·
That's really not how it is. For example, here the one single implementation of the madvise() syscall in Linux: http://git.kernel.org/cgit/linux/kernel/git/to
by caf 12y ago
That's really not how it is. For example, here the one single implementation of the madvise() syscall in Linux:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/mm/madvise.c?id=v4.0#n458 http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.g...
This entire file is compiled on all architectures with MMUs (madvise() is pointless on architectures without MMUs and hence without virtual memory). Everything architecture-specific in this file is abstracted away by macros like PAGE_SIZE and PAGE_SHIFT.