bug 460993 prevent external-app deadlock on unix. patch=Jason Evans, r=pavlov, a=dveditz
git-svn-id: svn://10.0.0.236/trunk@255117 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
ad78be4c4b
commit
fed4d7017f
@ -1199,6 +1199,9 @@ static
|
||||
#endif
|
||||
bool malloc_init_hard(void);
|
||||
|
||||
void _malloc_prefork(void);
|
||||
void _malloc_postfork(void);
|
||||
|
||||
/*
|
||||
* End function prototypes.
|
||||
*/
|
||||
@ -5489,6 +5492,11 @@ MALLOC_OUT:
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (!defined(MOZ_MEMORY_WINDOWS) && !defined(MOZ_MEMORY_DARWIN))
|
||||
/* Prevent potential deadlock on malloc locks after fork. */
|
||||
pthread_atfork(_malloc_prefork, _malloc_postfork, _malloc_postfork);
|
||||
#endif
|
||||
|
||||
/* Set variables according to the value of opt_small_max_2pow. */
|
||||
if (opt_small_max_2pow < opt_quantum_2pow)
|
||||
opt_small_max_2pow = opt_quantum_2pow;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user