Revision: 17610
Author:   [email protected]
Date:     Sat Nov  9 00:14:21 2013 UTC
Log:      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=
[email protected]

Review URL: https://codereview.chromium.org/63183003
http://code.google.com/p/v8/source/detail?r=17610

Modified:
 /branches/bleeding_edge/src/platform-posix.cc

=======================================
--- /branches/bleeding_edge/src/platform-posix.cc Fri Sep 27 10:53:07 2013 UTC +++ /branches/bleeding_edge/src/platform-posix.cc Sat Nov 9 00:14:21 2013 UTC
@@ -564,6 +564,9 @@
     : 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());
 }

--
--
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.

Reply via email to