Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Oct 2004 12:59:41 +0400
From:      Gleb Smirnoff <glebius@freebsd.org>
To:        Maxime Henrion <mux@freebsd.org>
Cc:        cvs-src@freebsd.org
Subject:   Re: cvs commit: src/sys/netgraph ng_device.c ng_device.h src/sys/modules/netgraph/device Makefile
Message-ID:  <20041019085941.GA79981@cell.sick.ru>
In-Reply-To: <20041018202531.GF45249@elvis.mu.org>
References:  <200410182013.i9IKDvcR002883@repoman.freebsd.org> <20041018202531.GF45249@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 18, 2004 at 10:25:31PM +0200, Maxime Henrion wrote:
M> Gleb Smirnoff wrote:
M> > glebius     2004-10-18 20:13:57 UTC
M> > 
M> >   FreeBSD src repository
M> > 
M> >   Modified files:
M> >     sys/netgraph         ng_device.c ng_device.h 
M> >     sys/modules/netgraph/device Makefile 
M> >   Log:
M> [...]
M> >      - Use MALLOC/FREE, instead of malloc/free.
M> 
M> This is backwards.  The MALLOC() and FREE() macros are deprecated, and
M> shouldn't be used in new code.  These macros were used because they
M> allowed an optimization when the size of the request is constant; some
M> computation was done at build-time rather than at run-time (if I
M> remember correctly, the computation is for getting the correct
M> power-of-2 free-list).  Anyways, this was with the McKusick-Karels
M> memory allocator, and these macros are not appropriate anymore, they
M> just obfuscate the code a bit.  I thought you'd like to know :-).

Thanks for this information. I did that because MALLOC/FREE is used
everywhere inside of sys/netgraph.
I'll probably change it back with next commit, if some more changes will
appear.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE



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