From owner-freebsd-arch Thu Feb 6 1: 2:30 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36F8637B401 for ; Thu, 6 Feb 2003 01:02:29 -0800 (PST) Received: from mail.chesapeake.net (chesapeake.net [205.130.220.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6562E43F3F for ; Thu, 6 Feb 2003 01:02:28 -0800 (PST) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h16928m13858; Thu, 6 Feb 2003 04:02:09 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Thu, 6 Feb 2003 04:02:08 -0500 (EST) From: Jeff Roberson To: Julian Elischer Cc: Peter Wemm , Dag-Erling Smorgrav , Subject: Re: New kernel allocation API In-Reply-To: Message-ID: <20030206040110.V79483-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 5 Feb 2003, Julian Elischer wrote: > > I know several consumers where the size is not known or would be > expensive to calculate on free. > I bet there are 10x as many that do: foo = malloc(sizeof(*foo)); Which could just as easily do: free(foo, sizeof(*foo)); Optimize for the common case. It will make the allocator MUCH faster. Cheers, Jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message