Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/sys




On Mar 20, 2006, at 8:45 AM, Garrett D'Amore wrote:

MALLOC is a big macro.  It really should *only* be used on hot code
paths where performance is critical.  I like the change that makes it
intentionally hard to use.  For 90%ish of cases, malloc() is probably
the better choice.

That's the trick -- if you use a compile-time constant size, that macro actually becomes quite small.

Of course, I think less and less of MALLOC() / FREE() pretty much every day, and would really prefer to see them gone completely. (Just what we want -- exposing the internals of malloc() to consumers of the KPI).

-- thorpej




Home | Main Index | Thread Index | Old Index