MCPcopy Create free account
hub / github.com/catboost/catboost / GetStack

Method GetStack

library/cpp/coroutine/engine/stack/stack_storage.h:42–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41 template<typename TGuard>
42 NDetails::TStack TStorage::GetStack(const TGuard& guard, const char* name) {
43 Y_ABORT_UNLESS(!IsEmpty()); // check before call
44
45 void* newStack = nullptr;
46 if (!Full_.empty()) {
47 newStack = Full_.back();
48 Full_.pop_back();
49 } else {
50 Y_ASSERT(!Released_.empty());
51 newStack = Released_.back();
52 Released_.pop_back();
53 }
54
55 Y_ABORT_UNLESS(guard.CheckOverflow(newStack), "corrupted stack in pool");
56 Y_ABORT_UNLESS(guard.CheckOverride(newStack, StackSize_), "corrupted stack in pool");
57
58 return NDetails::TStack{newStack, newStack, StackSize_, name};
59 }
60}

Callers

nothing calls this directly

Calls 6

IsEmptyFunction · 0.50
emptyMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45
CheckOverflowMethod · 0.45
CheckOverrideMethod · 0.45

Tested by

no test coverage detected