Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kalloc and funnels



On Thursday, June 26, 2003, at 3:46 AM, Mike Vannorsdel wrote:
Does it matter which funnel is held when using kalloc?

Nope. kalloc() is independent of the funnel mechanism. However, calling kalloc() may, if it blocks, cause you to temporarily loose whatever funnel you currently do hold. You'll reacquire it transparently when you wake up. But the "damage" may already be done. Any state that funnel was protecting may now be completely changed/invalid.

There is kalloc_canblock(size, FALSE) (symbol exported but no header) to get around that issue. But then you have to worry about temporary allocation failures (a worker thread is kicked off in the background to replenish the effected zone, but you can't predict when that will be finished).

We are in the process of defining a new set of common memory allocation routines for KEXT users going forward. It will certainly support non-blocking operations.

--Jim
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >kalloc and funnels (From: Mike Vannorsdel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.