| 251 | } |
| 252 | |
| 253 | TCont* TContExecutor::CreateOwned( |
| 254 | NCoro::TTrampoline::TFunc func, |
| 255 | const char* name, |
| 256 | TMaybe<ui32> customStackSize |
| 257 | ) noexcept { |
| 258 | Allocated_ += 1; |
| 259 | if (!customStackSize) { |
| 260 | customStackSize = DefaultStackSize_; |
| 261 | } |
| 262 | auto* cont = new TCont(*StackAllocator_, *customStackSize, *this, std::move(func), name); |
| 263 | ScheduleExecution(cont); |
| 264 | return cont; |
| 265 | } |
| 266 | |
| 267 | NCoro::NStack::TAllocatorStats TContExecutor::GetAllocatorStats() const noexcept { |
| 268 | return StackAllocator_->GetStackStats(); |