| 116 | } |
| 117 | |
| 118 | size_t Stack::getHighWaterMark() const |
| 119 | { |
| 120 | const auto begin = |
| 121 | static_cast<decltype(&stackSentinel)>(adjustedStorage_) + stackGuardSize / sizeof(stackSentinel); |
| 122 | const auto end = static_cast<decltype(&stackSentinel)>(adjustedStorage_) + adjustedSize_ / sizeof(stackSentinel); |
| 123 | const auto usedElement = std::find_if_not(begin, end, |
| 124 | [](decltype(stackSentinel)& element) -> bool |
| 125 | { |
| 126 | return element == stackSentinel; |
| 127 | }); |
| 128 | return (end - usedElement) * sizeof(*begin); |
| 129 | } |
| 130 | |
| 131 | int Stack::initialize(RunnableThread& runnableThread) |
| 132 | { |
no outgoing calls
no test coverage detected