• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: spinlock under fork()?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >spinlock under fork()? (From: Nathan Herring <email@hidden>)
 >RE: spinlock under fork()? (From: Nathan Herring <email@hidden>)
 >RE: spinlock under fork()? (From: Nathan Herring <email@hidden>)

  • Prev by Date: Re: spinlock under fork()?
  • Next by Date: Re: spinlock under fork()?
  • Previous by thread: RE: spinlock under fork()?
  • Next by thread: AppleUSBIrDA Released
  • Index(es):
    • Date
    • Thread