MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / get

Method get

thread/stack-allocator.cpp:80–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79 }
80 void* get() {
81 if (!pool.empty()) {
82 auto ret = pool.back();
83 pool.pop_back();
84 return ret;
85 }
86 return nullptr;
87 }
88 void put(void* ptr) { pool.emplace_back(ptr); }
89 };
90

Callers 1

allocMethod · 0.45

Calls 3

emptyMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected