From owner-freebsd-current@FreeBSD.ORG Tue Jun 3 14:55:54 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50DED37B401; Tue, 3 Jun 2003 14:55:54 -0700 (PDT) Received: from mx0.freebsd-services.com (survey.codeburst.net [195.149.39.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66D7143FA3; Tue, 3 Jun 2003 14:55:53 -0700 (PDT) (envelope-from paul@freebsd-services.com) Received: from [192.168.7.2] (freebsd.gotadsl.co.uk [81.6.249.198]) by mx0.freebsd-services.com (Postfix) with ESMTP id F0F4A1B212; Tue, 3 Jun 2003 22:55:51 +0100 (BST) From: Paul Richards To: Poul-Henning Kamp In-Reply-To: <26877.1054676171@critter.freebsd.dk> References: <26877.1054676171@critter.freebsd.dk> Content-Type: text/plain Organization: Message-Id: <1054590840.1641.12.camel@cf.freebsd-services.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 02 Jun 2003 22:54:01 +0100 Content-Transfer-Encoding: 7bit cc: "M. Warner Losh" cc: dfr@freebsd.org cc: current@freebsd.org Subject: Re: VFS: C99 sparse format for struct vfsops X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 03 Jun 2003 21:55:54 -0000 On Tue, 2003-06-03 at 22:36, Poul-Henning Kamp wrote: > In message , John Baldwin writes: > > > >On 02-Jun-2003 Paul Richards wrote: > >> On Mon, 2003-06-02 at 21:04, Paul Richards wrote: > >> > >>> > >>> The tradeoff with using an index into an array is that there'd be a > >>> heavy penalty for growing the array if an extra method didn't fit, but > >>> that would be exceptionally rare and with our present usage we'd never > >>> have that happen. > >> > >> I'm not sure this is actually a problem after all since the Interface > >> doesn't change and therefore we know a-priori how many methods there can > >> be so we can pre-allocate an array. > > I thought the point in KOBJ was that it was extensible so you could > KLD load stuff which added more methods ? Not exactly. It allows for dynamic binding of methods that implement a specified interface. It gives you 2 things mainly: 1) Not all the interface has to be implemented within a particular object, and things will just work if unimplemented parts of the interface are called on an object. 2) The actual functions called for a particular method can by dynamically changed (or at least they could be, I don't think there's actually any API that does this at the moment so in fact they just get mapped the once when the object is instantiated). The possible methods available in an interface are fixed, they're defined in the .m files. -- Tis a wise thing to know what is wanted, wiser still to know when it has been achieved and wisest of all to know when it is unachievable for then striving is folly. [Magician]