From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 6 21:54:13 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B209316A420 for ; Mon, 6 Feb 2006 21:54:13 +0000 (GMT) (envelope-from freebsd@luna.afraid.org) Received: from gw.luna.afraid.org (lls-c-13303.adsl.wanadoo.nl [81.69.81.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59D1443D45 for ; Mon, 6 Feb 2006 21:54:13 +0000 (GMT) (envelope-from freebsd@luna.afraid.org) Received: from [127.0.0.1] (gw.luna.afraid.org [127.0.0.1]) by gw.luna.afraid.org (Postfix) with ESMTP id D9A25D for ; Mon, 6 Feb 2006 22:54:11 +0100 (CET) Message-ID: <43E7C583.3040904@luna.afraid.org> Date: Mon, 06 Feb 2006 22:54:11 +0100 From: Raaf User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8) Gecko/20060118 Thunderbird/1.5 Mnenhy/0.7.3.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 06 Feb 2006 22:28:08 +0000 Subject: Freeing mmapped memory X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Feb 2006 21:54:13 -0000 Hi, i am working on a usb driver that allocates some memory when the device is opened using malloc. Now i want user processes to be able to access this memory using mmap and i want to free this memory when it is no longer needed. The problem is that there seems to be no way of knowing for my driver at what time the memory is no longer mapped in a process address space so that i can safely free this memory.