OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/threading/platform_thread.h" | 5 #include "base/threading/platform_thread.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <sched.h> | 8 #include <sched.h> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 #endif // !defined(OS_NACL) | 100 #endif // !defined(OS_NACL) |
101 } | 101 } |
102 | 102 |
103 void InitThreading() {} | 103 void InitThreading() {} |
104 | 104 |
105 void InitOnThread() {} | 105 void InitOnThread() {} |
106 | 106 |
107 void TerminateOnThread() {} | 107 void TerminateOnThread() {} |
108 | 108 |
109 size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { | 109 size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { |
110 #if !defined(THREAD_SANITIZER) && !defined(MEMORY_SANITIZER) | 110 #if !defined(THREAD_SANITIZER) |
111 return 0; | 111 return 0; |
112 #else | 112 #else |
113 // ThreadSanitizer bloats the stack heavily. Evidence has been that the | 113 // ThreadSanitizer bloats the stack heavily. Evidence has been that the |
114 // default stack size isn't enough for some browser tests. | 114 // default stack size isn't enough for some browser tests. |
115 // MemorySanitizer needs this as a temporary fix for http://crbug.com/353687 | |
116 return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux). | 115 return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux). |
117 #endif | 116 #endif |
118 } | 117 } |
119 | 118 |
120 } // namespace base | 119 } // namespace base |
OLD | NEW |