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

Unified Diff: platform/thread_win.cc

Issue 10544170: Have the stack overflow code use the correct stack size set by the platform/thread.h (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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 | « platform/thread_macos.cc ('k') | vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform/thread_win.cc
===================================================================
--- platform/thread_win.cc (revision 8702)
+++ platform/thread_win.cc (working copy)
@@ -49,8 +49,8 @@
int Thread::Start(ThreadStartFunction function, uword parameter) {
ThreadStartData* start_data = new ThreadStartData(function, parameter);
uint32_t tid;
- uintptr_t thread =
- _beginthreadex(NULL, 64 * KB, ThreadEntry, start_data, 0, &tid);
+ uintptr_t thread = _beginthreadex(NULL, Thread::GetMaxStackSize(),
+ ThreadEntry, start_data, 0, &tid);
if (thread == -1L || thread == 0) {
#ifdef DEBUG
fprintf(stderr, "_beginthreadex error: %d (%s)\n", errno, strerror(errno));
@@ -83,6 +83,12 @@
}
+intptr_t Thread::GetMaxStackSize() {
+ const int kStackSize = (256 * KB);
+ return kStackSize;
+}
+
+
void Thread::SetThreadLocal(ThreadLocalKey key, uword value) {
ASSERT(key != kUnsetThreadLocalKey);
BOOL result = TlsSetValue(key, reinterpret_cast<void*>(value));
« no previous file with comments | « platform/thread_macos.cc ('k') | vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698