Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Feb 2003 04:02:08 -0500 (EST)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        Julian Elischer <julian@elischer.org>
Cc:        Peter Wemm <peter@wemm.org>, Dag-Erling Smorgrav <des@ofug.org>, <arch@FreeBSD.ORG>
Subject:   Re: New kernel allocation API 
Message-ID:  <20030206040110.V79483-100000@mail.chesapeake.net>
In-Reply-To: <Pine.BSF.4.21.0302051042480.97117-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030206040110.V79483-100000>