tech-kern archive

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

Re: kernel memory allocation failures



	Hello.  I'm coming to this rather late, but my understanding is that
if you use malloc() in the kernel, you need to check to make sure you have
actually gotten that memory on return.  If you use MALLOC() (upper
case), then, upon return, the memory is guaranteed to have been allocated.
What this means is that you can't use MALLOC() anywhere sleeping is
prohibited, i.e. interrupts, mutexes, etc.  Is that understanding out of
date or wrong?  Does our implementation not conform with that model?
-thanks
-Brian



Home | Main Index | Thread Index | Old Index