contigmalloc() and mmap()

Scott Long scottl at samsco.org
Mon Jun 13 18:58:23 GMT 2005


Christoph Hellwig wrote:

> On Mon, Jun 13, 2005 at 12:37:07PM -0600, Scott Long wrote:
> 
>>How does linux handle the implications of fork(2) in this scenario?
> 
> 
> it's still counted as the same instance.  Similar for dup or passing
> descriptors over AF_UNIX sockets. The data is explictly not per-process
> but per instance.
> 
> There's not a lot of users actually using this feature, only the tty
> subsystem and multi-channel sound drivers for the old oss API that
> allowed multiple opens of /dev/dsp that way come to mind.
> 
> Lot's of driver use file->private to get at per-device data easily,
> but that's just a shortcut.

Ok, I thought that you were talking about per-process data being in the
file descriptor.

Scott


More information about the freebsd-hackers mailing list