OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef StackFrameDepth_h | 5 #ifndef StackFrameDepth_h |
6 #define StackFrameDepth_h | 6 #define StackFrameDepth_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "wtf/Assertions.h" | 9 #include "wtf/Assertions.h" |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void configureLimit(); | 43 void configureLimit(); |
44 | 44 |
45 static size_t getUnderestimatedStackSize(); | 45 static size_t getUnderestimatedStackSize(); |
46 static void* getStackStart(); | 46 static void* getStackStart(); |
47 | 47 |
48 private: | 48 private: |
49 // The maximum depth of eager, unrolled trace() calls that is | 49 // The maximum depth of eager, unrolled trace() calls that is |
50 // considered safe and allowed. | 50 // considered safe and allowed. |
51 static const int kSafeStackFrameSize = 32 * 1024; | 51 static const int kSafeStackFrameSize = 32 * 1024; |
52 | 52 |
| 53 // Do not call functions recursively if remained stack memory is less |
| 54 // than this value. |
| 55 static const int kStackRoomSize; |
| 56 |
53 uintptr_t m_stackFrameLimit; | 57 uintptr_t m_stackFrameLimit; |
54 }; | 58 }; |
55 | 59 |
56 } // namespace blink | 60 } // namespace blink |
57 | 61 |
58 #endif // StackFrameDepth_h | 62 #endif // StackFrameDepth_h |
OLD | NEW |