Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Feb 2003 03:50:20 -0500 (EST)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        Peter Wemm <peter@wemm.org>
Cc:        Dag-Erling Smorgrav <des@ofug.org>, <arch@FreeBSD.ORG>
Subject:   Re: New kernel allocation API 
Message-ID:  <20030205034836.L96521-100000@mail.chesapeake.net>
In-Reply-To: <20030205043024.06D122A8C1@canning.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 4 Feb 2003, Peter Wemm wrote:

> Dag-Erling Smorgrav wrote:
> > --=-=-=
> >
> > The attached patch creates two new entry points for malloc(), named
> > kalloc() and kalloc_nowait(), eliminating the need for the M_NOWAIT
> > and M_TRYWAIT constants.  The patch also defines malloc() as a macro
> > which invokes the appropriate API function, so source-level
> > compatibility is maintained.
>
> The current bikeshed is about the mbuf functions as well, not just the
> malloc function..
>

If you would like to make a new malloc/free api I have some comments.
most notably, free should require the size on return.  This yields much
cleaner implementations with little or no cost to most consumers.  I had
some local patches to do this when I was working on uma but not having
naturally aligned sizes broke too much code.

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?20030205034836.L96521-100000>