malloc/free from ISR

Eric Norum eric.norum at usask.ca
Wed Nov 13 16:39:57 UTC 2002


On Wednesday, November 13, 2002, at 10:19  AM, Brett Swimley wrote:

> Hi All,
>
> Is it legal to call malloc/free from an ISR?  I'm got a device driver 
> that
> does this and having a bit of problem.  Don't know if this is the 
> issue but
> thought I would ask the question.
>

You're probably better off rewriting the device driver so that the bulk 
of the ISR code runs in the context of an interrupt handler task rather 
than in the interrupt handler itself.  This is the way network drivers 
work, for example.  Someday terminal drivers will work this way, too.

-- 
Eric Norum <eric.norum at usask.ca>
Department of Electrical Engineering
University of Saskatchewan
Saskatoon, Canada.
Phone: (306) 966-5394   FAX:   (306) 966-5407




More information about the users mailing list