mmap() problem

Poul-Henning Kamp phk at
Wed Jul 28 13:08:48 UTC 2010

In message <201007281056.43100.hselasky at>, Hans Petter Selasky writes:

>When is it safe to free memory which has been mmapped to a user-space 
>application? After close() or during close() or before close() or when the 
>process/thread terminates?

Assuming you mean memory activated via devsw->mmap:  never.

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the freebsd-current mailing list