Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Unified Diff: samples/shell.cc

Issue 6452006: [Isolates] Increase the isolate thread's stack size for tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/shell.cc
diff --git a/samples/shell.cc b/samples/shell.cc
index 3efd9dbb503e703416d5334ebb5f123c6ecce586..5d5ad4a1f8506fe85ed680ef381c68f346f411d3 100644
--- a/samples/shell.cc
+++ b/samples/shell.cc
@@ -109,7 +109,19 @@ class SourceGroup {
#else
void StartExecuteInThread() {
- pthread_create(&thread_, NULL, &IsolateThreadEntry, this);
+ pthread_attr_t attr;
+ // On some systems (OSX 10.6) the stack size default is 0.5Mb or less
+ // which is not enough to parse the big literal expressions used in tests.
+ // The stack size should be at least StackGuard::kLimitSize + some
+ // OS-specific padding for thread startup code.
+ size_t stacksize = 1024 * 1024; // 1 Mb seems to be enough
+ pthread_attr_init(&attr);
+ pthread_attr_setstacksize (&attr, stacksize);
+ int error = pthread_create(&thread_, &attr, &IsolateThreadEntry, this);
+ if (error) {
+ printf("Error creating isolate thread.\n");
+ exit(1);
+ }
}
void WaitForThread() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698