Date: Sun, 4 Apr 2004 17:00:22 -0700 From: Alfred Perlstein <alfred@freebsd.org> To: Nate Lawson <nate@root.org> Cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/net80211 ieee80211_node.c Message-ID: <20040405000022.GX26131@elvis.mu.org> In-Reply-To: <20040403143811.H11430@root.org> References: <20040402230239.23FA616A4F4@hub.freebsd.org> <20040403143811.H11430@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Nate Lawson <nate@root.org> [040403 13:39] wrote: > On Fri, 2 Apr 2004, Sam Leffler wrote: > > sam 2004/04/02 15:02:24 PST > > > > FreeBSD src repository > > > > Modified files: > > sys/net80211 ieee80211_node.c > > Log: > > replace explicit malloc/free with MALLOC/FREE for portability > > > > Obtained from: madwifi > > > > Revision Changes Path > > 1.17 +5 -3 src/sys/net80211/ieee80211_node.c > > Strange, sys/malloc.h says these are deprecated: > > /* > * Deprecated macro versions of not-quite-malloc() and free(). > */ > #define MALLOC(space, cast, size, type, flags) \ > ((space) = (cast)malloc((u_long)(size), (type), (flags))) > #define FREE(addr, type) free((addr), (type)) They were the prefered mechanism because of the formerly available macros that would evaluate the malloc bucket to pull-from/release-to in several cycles via constant folding. In fact I still think the macros are a decent idea because we might later find a cool optimization we can do via macros. -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040405000022.GX26131>