Re: spinlock under fork()?
Re: spinlock under fork()?
- Subject: Re: spinlock under fork()?
- From: Eli Bach <email@hidden>
- Date: Wed, 17 Sep 2008 18:42:12 -0700
On Sep 17, 2008, at 6:08 PM, Nathan Herring wrote:
Gah. Calling malloc_create_zone followed by malloc_zone_register of
said zone is causing the problem. Omitting the register seems to
work fine and doesn't cause the hang.
Is this legit? Are you not supposed to register a zone after
creation? The comments in malloc/malloc.h say that
malloc_zone_register "regisers a freshly created zone; should
typically be called after a zone has been created". Or this function
only for zones you're building from scratch (i.e., filling out the
structs)?
From Google [I haven't bothered to actually download the darwin-
source for malloc to make sure], but malloc_create_zone() calls
malloc_zone_register() on the zone before returning. Given the lack
of documentation, I would postulate that you should only call
malloc_zone_register() for a zone that you somehow create yourself,
without the use of malloc_create_zone().
_______________________________________________
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