From owner-cvs-src@FreeBSD.ORG Tue Oct 19 08:59:46 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 0F79816A4CE; Tue, 19 Oct 2004 08:59:46 +0000 (GMT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AE8D43D58; Tue, 19 Oct 2004 08:59:45 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id i9J8xgvX080015 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Oct 2004 12:59:43 +0400 (MSD) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id i9J8xgbK080014; Tue, 19 Oct 2004 12:59:42 +0400 (MSD) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Tue, 19 Oct 2004 12:59:41 +0400 From: Gleb Smirnoff To: Maxime Henrion Message-ID: <20041019085941.GA79981@cell.sick.ru> References: <200410182013.i9IKDvcR002883@repoman.freebsd.org> <20041018202531.GF45249@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20041018202531.GF45249@elvis.mu.org> User-Agent: Mutt/1.5.6i cc: cvs-src@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: Tue, 19 Oct 2004 08:59:46 -0000 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