Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Mar 2017 10:14:59 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        =?UTF-8?Q?Manuel_St=c3=bchn?= <freebsdnewbie@freenet.de>, freebsd-hackers@freebsd.org
Subject:   Re: mmap device-drivers
Message-ID:  <9f4864ee-45e4-e8d3-b875-b073921b643f@selasky.org>
In-Reply-To: <20170314090905.GA94880@freebsd-t420.fritz.box>
References:  <20170314090905.GA94880@freebsd-t420.fritz.box>

next in thread | previous in thread | raw e-mail | index | archive | help
On 03/14/17 10:09, Manuel Stühn wrote:
> Hi,
> is it possible for a device driver to keep track if there are still
> active mmap() pointers pointing to that device?
>
> Linux does have something like
>
> struct vm_operations_struct vm_ops =
> {
>                 .close = vm_close,
> };
>
> where vm_close gets called when any mmapped pointer goes out of scope and the
> driver can refcount the mappers.
>
> Is there something similar in freebsd?

Hi,

 From what I know from the past, any memory mapped to userspace via MMAP 
can never be freed.

--HPS




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9f4864ee-45e4-e8d3-b875-b073921b643f>