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

Function WriteStack

library/cpp/coroutine/engine/stack/benchmark/alloc_bm.cpp:25–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 }
24
25 void WriteStack(TStackHolder& stack) {
26 auto memory = stack.Get();
27 Y_ABORT_UNLESS(!memory.empty());
28 stack.LowerCanaryOk();
29 stack.UpperCanaryOk();
30 for (size_t i = PageSize / 2; i < memory.size(); i += PageSize * 2) {
31 memory[i] = 42;
32 }
33 }
34
35 static void BM_GetAlignedMemory(benchmark::State& state) {
36 char* raw = nullptr;

Calls 5

LowerCanaryOkMethod · 0.80
UpperCanaryOkMethod · 0.80
GetMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected