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

Side by Side Diff: src/d8.cc

Issue 9017009: Reduce signal sender thread stack size to 32k. Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 const char* chars = ReadChars(name, &size); 1073 const char* chars = ReadChars(name, &size);
1074 if (chars == NULL) return Handle<String>(); 1074 if (chars == NULL) return Handle<String>();
1075 Handle<String> result = String::New(chars, size); 1075 Handle<String> result = String::New(chars, size);
1076 delete[] chars; 1076 delete[] chars;
1077 return result; 1077 return result;
1078 } 1078 }
1079 1079
1080 1080
1081 #ifndef V8_SHARED 1081 #ifndef V8_SHARED
1082 i::Thread::Options SourceGroup::GetThreadOptions() { 1082 i::Thread::Options SourceGroup::GetThreadOptions() {
1083 i::Thread::Options options;
1084 options.name = "IsolateThread";
1085 // On some systems (OSX 10.6) the stack size default is 0.5Mb or less 1083 // On some systems (OSX 10.6) the stack size default is 0.5Mb or less
1086 // which is not enough to parse the big literal expressions used in tests. 1084 // which is not enough to parse the big literal expressions used in tests.
1087 // The stack size should be at least StackGuard::kLimitSize + some 1085 // The stack size should be at least StackGuard::kLimitSize + some
1088 // OS-specific padding for thread startup code. 1086 // OS-specific padding for thread startup code. 2Mbytes seems to be enough.
1089 options.stack_size = 2 << 20; // 2 Mb seems to be enough 1087 return i::Thread::Options("IsolateThread", 2 << 20);
Vyacheslav Egorov (Chromium) 2011/12/21 13:22:12 I would prefer 2 * MB instead of 2 << 20.
1090 return options;
1091 } 1088 }
1092 1089
1093 1090
1094 void SourceGroup::ExecuteInThread() { 1091 void SourceGroup::ExecuteInThread() {
1095 Isolate* isolate = Isolate::New(); 1092 Isolate* isolate = Isolate::New();
1096 do { 1093 do {
1097 if (next_semaphore_ != NULL) next_semaphore_->Wait(); 1094 if (next_semaphore_ != NULL) next_semaphore_->Wait();
1098 { 1095 {
1099 Isolate::Scope iscope(isolate); 1096 Isolate::Scope iscope(isolate);
1100 Locker lock(isolate); 1097 Locker lock(isolate);
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 } 1390 }
1394 1391
1395 } // namespace v8 1392 } // namespace v8
1396 1393
1397 1394
1398 #ifndef GOOGLE3 1395 #ifndef GOOGLE3
1399 int main(int argc, char* argv[]) { 1396 int main(int argc, char* argv[]) {
1400 return v8::Shell::Main(argc, argv); 1397 return v8::Shell::Main(argc, argv);
1401 } 1398 }
1402 #endif 1399 #endif
OLDNEW
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/deoptimizer.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698