Commit b9ce6684 authored by palfia@homejinni.com's avatar palfia@homejinni.com

Set at least PTHREAD_STACK_MIN stack size when creating threads.

This patch makes sure, that the stack size of the new threads are never
less than PTHREAD_STACK_MIN, otherwise the pthread_attr_setstacksize()
function sets the default stack size (8MB), which leads to failure
in the BootUpMemoryUse test.

TEST=cctest/test-mark-compact/BootUpMemoryUse
BUG=
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/63183003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c4a4c95e
......@@ -564,6 +564,9 @@ Thread::Thread(const Options& options)
: data_(new PlatformData),
stack_size_(options.stack_size()),
start_semaphore_(NULL) {
if (stack_size_ > 0 && stack_size_ < PTHREAD_STACK_MIN) {
stack_size_ = PTHREAD_STACK_MIN;
}
set_name(options.name());
}
......
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