uses of mmap

Jerome Freedman freedman at mips2.cr.bull.com
Tue Sep 4 22:31:35 AEST 1990


  I have been looking at mmap (for work I did last year it
would have been GREAT - i think). I am not sure I understand
how it is used - I am looking at the man page (MIPS RiscOs).

"mmap maps pages of memory from the memory device associated
with file fd into the address space of the calling process.."

 Now , If I want to mmap a file it looks as though I have to
open the device on which the file resides to get the fd 
mentioned in the man pages and somehow get the offset of
the file I want to map - is this a correct interpretation
it all seems murky. Can some one post me an example of code
using mmap?


                              Jerry Freedman,Jr



More information about the Comp.unix.questions mailing list