Reviewers: danno, Jakob, Yang, kisg, kilvadyb, Paul Lind,
Message:
Hi Yang and Jakob,
Please take a look.
Thanks!
Description:
Sets 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=
Please review this at https://codereview.chromium.org/63183003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+3, -1 lines):
M src/platform-posix.cc
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index
797557d76f830cde51cb37943edce6f5d6f3504b..5d4e2fe4439a100115b26d51073d6184b36b1b24
100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -628,7 +628,9 @@ void Thread::Start() {
// Native client uses default stack size.
#if !defined(__native_client__)
if (stack_size_ > 0) {
- result = pthread_attr_setstacksize(&attr,
static_cast<size_t>(stack_size_));
+ result = pthread_attr_setstacksize(
+ &attr,
+ static_cast<size_t>(Max(stack_size_, PTHREAD_STACK_MIN)));
ASSERT_EQ(0, result);
}
#endif
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.