MCPcopy Create free account
hub / github.com/caozhiyi/CppNet / PoolLargeMalloc

Method PoolLargeMalloc

base/BlockMemoryPool.cpp:19–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19void* CBlockMemoryPool::PoolLargeMalloc() {
20 std::unique_lock<std::mutex> lock(_large_mutex);
21 if (_free_mem_vec.empty()) {
22 Expansion();
23 }
24
25 void* ret = _free_mem_vec.back();
26 _free_mem_vec.pop_back();
27 return ret;
28}
29
30void CBlockMemoryPool::PoolLargeFree(void* &m) {
31 std::unique_lock<std::mutex> lock(_large_mutex);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected