[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changes in vm_operations_struct 2.2.x => 2.4.x
Hi Thomas,
The full story is, that the memory block will not only be accessed by the user space process mapping it, but also by a hardware device, which relies on the memory block
being physically contiguous (which can not be guaranteed - and will in general not be the case - for IPC shared memory). I.e. that memory block will be used to communicate
data between a user process and a hardware device.
regards
Martin
Thomas Hofer wrote:
> Martin Maletinsky wrote (Donnerstag, 9. August 2001 09:02):
> > My module allocates a block of memory, and exports that block to user
> > space processes, by registering as a character device and
> > implementing a mmap file operation, so that user space processes can
> > map that memory block into their virtual address space by calling
> > mmap().
>
> Would it be possible to do this with shared memory (shmget/shmat)?
> What's the advantage of making a device and mmaping it? Sounds
> more complicated. (I did only user-space programs as yet, so forgive me
> my naivity)
>
> Thomas.
> -
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/kernelnewbies/
> IRC Channel: irc.openprojects.net / #kernelnewbies
> Web Page: http://www.kernelnewbies.org/
--
Supercomputing System AG email: maletinsky@scs.ch
Martin Maletinsky phone: +41 (0)1 445 16 05
Technoparkstrasse 1 fax: +41 (0)1 445 16 10
CH-8005 Zurich
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/