mmap() system call

James Symon symon at aesop.cs.unc.edu
Wed Oct 3 23:07:46 AEST 1990


In article <5994 at ge-dab.GE.COM>, coleman at sundae9.DAB.GE.COM (Richard Coleman) writes:
> 
> I was looking at the system call mmap().  I not sure what
> the purpose of this system call is.  Could someone help.
> 

Besides regular files, the file that you map to your program`s data
space can be some device. The call to mmap() will use the mmap routine
from the device driver. This method is often used with custom hardware
to allow direct access to device registers through program variables.
With root permission you can memory map directly to bus addresses, at
least on Suns, using the various address spaces such as vme24d16. If
you have Sun documentation look at the document about writing device
drivers. I`ve also seen a book about writing UNIX device drivers that
can help you understand mmap().

Jim Symon
symon at radonc.unc.edu
symon at cs.unc.edu
(919) 966-7710



More information about the Comp.unix.programmer mailing list