From owner-cvs-src@FreeBSD.ORG Mon Oct 18 21:56:22 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1AB3716A4CE; Mon, 18 Oct 2004 21:56:22 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id F302C43D31; Mon, 18 Oct 2004 21:56:21 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id E87895C8FA; Mon, 18 Oct 2004 14:56:21 -0700 (PDT) Date: Mon, 18 Oct 2004 23:56:21 +0200 From: Maxime Henrion To: Gleb Smirnoff Message-ID: <20041018215621.GA41649@elvis.mu.org> References: <200410182013.i9IKDvcR002883@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410182013.i9IKDvcR002883@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netgraph ng_device.c ng_device.h src/sys/modules/netgraph/device Makefile X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2004 21:56:22 -0000 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