/dev/mem and /dev/shm
From: Captain Dondo (yan_at_NsOeSiPnAeMr.com)
Date: 10/29/05
- Previous message: Tim Roberts: "Re: Microsoft Hatred FAQ"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 29 Oct 2005 14:05:08 -0700
Could someone please point me at some docs or explain the difference
betwen these two?
>From the docs, I can do
fd = shm_open("file",..,..);
memptr = mmap(..,fd..,..,offset);
and I can do
fd = open("/dev/mem",...);
memptr = mmap(..,fd,...,offset);
What is the difference? If I set offset the same, will memptr point to
the same block of memory?
And what does tmpfs have to do with this? I've been through two posix
books, googled all over the place, and I'm still confused. I have not
found a single clear example of the use of shm_open and how it relates to
a memory mapping.....
(I think I understand the open/mmap; at least I can use it in my code and
it works without errors.... :-) )
--Yan
-- o__ ,>/'_ o__ (_)\(_) ,>/'_ o__ Yan Seiner, PE (_)\(_) ,>/'_ o__ Certified Personal Trainer (_)\(_) ,>/'_ o__ Licensed Professional Engineer (_)\(_) ,>/'_ Who says engineers have to be pencil necked geeks? (_)\(_)
- Previous message: Tim Roberts: "Re: Microsoft Hatred FAQ"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]