cvs commit: src/sys/netgraph ng_device.c ng_device.h src/sys/modules/netgraph/device Makefile

Gleb Smirnoff glebius at freebsd.org
Tue Oct 19 01:59:46 PDT 2004


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


More information about the cvs-src mailing list