Re: Leaking Mach Ports?
Re: Leaking Mach Ports?
- Subject: Re: Leaking Mach Ports?
- From: Dirk Musfeldt <email@hidden>
- Date: Mon, 14 Mar 2005 11:37:47 +0100
Matt,
using pthread_mach_thread_np() instead of mach_thread_self() indeed solved
the problem. Thank you for that hint!
>> I seem to recall that you have to call mach_port_deallocate() for any
>> port returned from mach_thread_self()...Are you doing that?
>
> No one should be using mach_thread_self(), unless you are creating raw
> mach threads. Use pthread_mach_thread_np() instead. This does not
> require a mach_port_deallocate().
>
> I believe the port leak being seen here is normal, as a thread port
> remains after the thread is detached, to be cleaned up by the next
> pthread_create() or pthread_exit() that is called.
>
> matt.
>
>
Regards
Dirk
_______________________________________________
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