Don't set "unlimited" stacks on iOS

Since iOS is a very memory-limited environment, a very large stack
isn't desireable.

BUG=None
TEST=None


Review URL: https://chromiumcodereview.appspot.com/10796098

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148080 0039d316-1c4b-4281-b951-d872f2087c98
parent e6fe6161
......@@ -87,7 +87,7 @@ bool CreateThread(size_t stack_size, bool joinable,
pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_DETACHED);
}
#if defined(OS_MACOSX)
#if defined(OS_MACOSX) && !defined(OS_IOS)
// The Mac OS X default for a pthread stack size is 512kB.
// Libc-594.1.4/pthreads/pthread.c's pthread_attr_init uses
// DEFAULT_STACK_SIZE for this purpose.
......@@ -116,7 +116,7 @@ bool CreateThread(size_t stack_size, bool joinable,
static_cast<size_t>(stack_rlimit.rlim_cur));
}
}
#endif // OS_MACOSX
#endif // OS_MACOSX && !OS_IOS
if (stack_size > 0)
pthread_attr_setstacksize(&attributes, stack_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment