[PATCH 1/2] Move zone registration to zone.c

Jason Evans jasone at canonware.com
Fri Mar 30 10:54:36 PDT 2012


On Mar 27, 2012, at 5:46 AM, Mike Hommey wrote:
> On Tue, Mar 27, 2012 at 02:20:12PM +0200, Mike Hommey wrote:
>> @@ -743,8 +723,8 @@ void
>> jemalloc_darwin_init(void)
>> {
>> 
>> -	if (malloc_init_hard())
>> -		abort();
>> +	if (!malloc_init_hard())
>> +		register_zone();
>> }
>> #endif
> 
> Please note that I first attempted to move this function too, and do
> lazy initialization of jemalloc, but that ends up in a dead lock because
> pthread_atfork calls malloc.

Now that pthread_atfork() isn't being called on Darwin, does deadlock still occur due to some other memory allocation during initialization?

Jason


More information about the jemalloc-discuss mailing list