MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / populate_initial_block_list

Function populate_initial_block_list

deps/concurrentqueue/concurrentqueue.h:3022–3037  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3020 //////////////////////////////////
3021
3022 void populate_initial_block_list(size_t blockCount)
3023 {
3024 initialBlockPoolSize = blockCount;
3025 if (initialBlockPoolSize == 0) {
3026 initialBlockPool = nullptr;
3027 return;
3028 }
3029
3030 initialBlockPool = create_array<Block>(blockCount);
3031 if (initialBlockPool == nullptr) {
3032 initialBlockPoolSize = 0;
3033 }
3034 for (size_t i = 0; i < initialBlockPoolSize; ++i) {
3035 initialBlockPool[i].dynamicallyAllocated = false;
3036 }
3037 }
3038
3039 inline Block* try_get_block_from_initial_pool()
3040 {

Callers 1

ConcurrentQueueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected