Re: Memory Allocation in Interrupt Handlers?
Re: Memory Allocation in Interrupt Handlers?
- Subject: Re: Memory Allocation in Interrupt Handlers?
- From: Alexander von Below <email@hidden>
- Date: Wed, 9 May 2007 23:59:26 +0200
Thanks for all of your replies!
Alex
Am 09.05.2007 um 23:55 schrieb Michael Smith:
On May 9, 2007, at 5:03 AM, email@hidden wrote:
the answer to this is probably easy to find in the right place, but
is there a memory allocation routine that is interrupt safe? From the
documentation for IOMalloc it is clear that it is not, so is there a
function that is?
Or would I have to allocate all my memory prior to going into
interrupt context?
First; you should go to great lengths to avoid allocating memory on
any I/O path. A couple of good ideas:
Second; unless you are using an IOFilterInterruptEventSource, you
are not running any code in interrupt context.
IOInterruptEventSource handlers run in "regular" thread context.
You can (but per the above, should not make a habit of) allocate
memory in the latter.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden