forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStackProber.h
More file actions
25 lines (23 loc) · 809 Bytes
/
Copy pathStackProber.h
File metadata and controls
25 lines (23 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#pragma once
class StackProber
{
public:
void Initialize();
size_t GetScriptStackLimit() const { return stackLimit; }
#if DBG
void AdjustKnownStackLimit(size_t sp, size_t size)
{
if (knownStackLimit == 0) knownStackLimit = sp - size;
knownStackLimit = ((sp - size) < knownStackLimit) ? (sp - size) : knownStackLimit;
}
#endif
private:
size_t stackLimit;
#if DBG
size_t knownStackLimit;
#endif
};