From owner-freebsd-current@FreeBSD.ORG Wed Aug 21 23:53:07 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D31B78B3; Wed, 21 Aug 2013 23:53:07 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id A516B27DD; Wed, 21 Aug 2013 23:53:07 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id r7LNr6Rl080859; Wed, 21 Aug 2013 16:53:06 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <521552E2.2000008@rawbw.com> Date: Wed, 21 Aug 2013 16:53:06 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130628 Thunderbird/17.0.7 MIME-Version: 1.0 To: current@freebsd.org Subject: Re: How to best overload the fileops ? References: <521508F4.6030502@rawbw.com> <20130821232113.GD94127@funkthat.com> In-Reply-To: <20130821232113.GD94127@funkthat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Roman Divacky , John-Mark Gurney X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 23:53:07 -0000 On 08/21/2013 16:21, John-Mark Gurney wrote: > How did this memory get allocated in the first place? Why does it need > to be free'd in fo_close and not another location? It is allocated by the epoll module right after kqueue object is created and is attached to the opaque field in the file object. And it should be deallocated when this fd is closed, hence fo_close. Yuri