зеркало из https://github.com/mozilla/pjs.git
Bugzilla bug 274450: a default thread stack size of 64K is too small for
Mozilla on Linux. Use the default pthread stack size instead, and do that on all platforms (not just Linux). r=bzbarsky.
This commit is contained in:
Родитель
bd5524f803
Коммит
accfc61795
|
@ -356,12 +356,18 @@ static PRThread* _PR_CreateThread(
|
|||
PR_ASSERT(0 == rv);
|
||||
#endif /* !defined(_PR_DCETHREADS) */
|
||||
|
||||
if (0 == stackSize) stackSize = (64 * 1024); /* default == 64K */
|
||||
/*
|
||||
* If stackSize is 0, we use the default pthread stack size.
|
||||
*/
|
||||
if (stackSize)
|
||||
{
|
||||
#ifdef _MD_MINIMUM_STACK_SIZE
|
||||
if (stackSize < _MD_MINIMUM_STACK_SIZE) stackSize = _MD_MINIMUM_STACK_SIZE;
|
||||
if (stackSize < _MD_MINIMUM_STACK_SIZE)
|
||||
stackSize = _MD_MINIMUM_STACK_SIZE;
|
||||
#endif
|
||||
rv = pthread_attr_setstacksize(&tattr, stackSize);
|
||||
PR_ASSERT(0 == rv);
|
||||
rv = pthread_attr_setstacksize(&tattr, stackSize);
|
||||
PR_ASSERT(0 == rv);
|
||||
}
|
||||
|
||||
thred = PR_NEWZAP(PRThread);
|
||||
if (NULL == thred)
|
||||
|
|
Загрузка…
Ссылка в новой задаче