Subject: Re: Corret way to allocate memory in kernel ?
To: Darren Reed <darrenr@cyber.com.au>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 08/15/1996 08:40:57
On Thu, 15 Aug 1996 23:17:31 +1000 (EST)
Darren Reed <darrenr@cyber.com.au> wrote:
> And what about using MALLOC() vs malloc() in the kernel ?
>
> Seems like I want to do MALLOC(), for the spl() ?
>
> But grep'ing through a 1.1 kernel shows a fair amount of mallc()...
Most places just use malloc(). Really, MALLOC() is just an attept to
optimize ... you'll note that if DIAGNOSTIC is defined, it just expands
to a call to malloc() ... malloc() does an splimp() internally.
It's mostly a stylistic thing, I think... I usually just use malloc().
-- save the ancient forests - http://www.bayarea.net/~thorpej/forest/ --
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939