Date: Mon, 18 Oct 2004 22:25:31 +0200 From: Maxime Henrion <mux@freebsd.org> To: Gleb Smirnoff <glebius@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: <20041018202531.GF45249@elvis.mu.org> In-Reply-To: <200410182013.i9IKDvcR002883@repoman.freebsd.org> References: <200410182013.i9IKDvcR002883@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Gleb Smirnoff wrote: > glebius 2004-10-18 20:13:57 UTC > > FreeBSD src repository > > Modified files: > sys/netgraph ng_device.c ng_device.h > sys/modules/netgraph/device Makefile > Log: [...] > - Use MALLOC/FREE, instead of malloc/free. This is backwards. The MALLOC() and FREE() macros are deprecated, and shouldn't be used in new code. These macros were used because they allowed an optimization when the size of the request is constant; some computation was done at build-time rather than at run-time (if I remember correctly, the computation is for getting the correct power-of-2 free-list). Anyways, this was with the McKusick-Karels memory allocator, and these macros are not appropriate anymore, they just obfuscate the code a bit. I thought you'd like to know :-). Thanks for the great work on ng_device! Cheers, Maxime
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041018202531.GF45249>