Does anyone know what the difference between mmap(2)
and mmap(3)
is? Man section 3 is described as "This chapter describes all library functions excluding the library functions described in chapter 2, which implement system calls." Doesn't mmap(3)
perform a system call?
Reading the two man pages, I see that mmap(2)
seems to accept a much wider variety of flags than mmap(3)
does, and claims to be able to map device I/O spaces. mmap(3)
claims to be able to map "shared memory objects" and "typed memory objects" in addtion to files, but doesn't mention device I/O.
Since the two functions have the same name, I'm not even sure how I can choose one rather than the other.