Re: What's possible within a Notifier
Re: What's possible within a Notifier
- Subject: Re: What's possible within a Notifier
- From: "Duane Murphy" <email@hidden>
- Date: Fri, 14 Feb 2003 12:02:15 -0800
--- At Fri, 14 Feb 2003 14:27:41 -0500, Mike Cohen wrote:
>
How about resizing a handle? I have a notifier that works under X which
>
uses PtrAndHand to append the received data to an existing handle,
>
which is monitored in a separate thread. Will that also work under 9?
No, it wont work. The memory manager on OS 9 is _not_ interrupt safe.
OTMemAlloc and friends are required when working with interrupt code.
>
On Friday, February 14, 2003, at 01:41 PM, Duane Murphy wrote:
>
>
>> From what I can gather from the docs, that you must use the
>
>> OTMemAlloc and
>
>> OTMemFree calls for any memory stuff, as basically you are running at
>
>> interrupt time on 9.x. So the usually interrupt safe coding is
>
>> required, and
>
>> to be quick in what you do. (X your are a separate thread from what
>
>> I'm seen
>
>> from the debugger.)
>
>
>
> While I cant specifically answer your question concerning notifiers. I
>
> want to reiterate that OTMemAlloc can and will fail. OTMemAlloc is an
>
> interrupt safe sub-allocator with a small amount of memory to work
>
> with.
>
> You _must_ be prepared for OTMemAlloc to fail.
>
>
>
> Just a friendly warning from experience. :-)
...Duane
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.