cvs commit: src/sys/net80211 ieee80211_node.c

Alfred Perlstein alfred at freebsd.org
Sun Apr 4 17:00:22 PDT 2004


* Nate Lawson <nate at 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 at mu.org cell: 408-480-4684


More information about the cvs-src mailing list