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

Function requisition_block

deps/concurrentqueue/concurrentqueue.h:3074–3092  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3072 // Gets a free block from one of the memory pools, or allocates a new one (if applicable)
3073 template<AllocationMode canAlloc>
3074 Block* requisition_block()
3075 {
3076 auto block = try_get_block_from_initial_pool();
3077 if (block != nullptr) {
3078 return block;
3079 }
3080
3081 block = try_get_block_from_free_list();
3082 if (block != nullptr) {
3083 return block;
3084 }
3085
3086 MOODYCAMEL_CONSTEXPR_IF (canAlloc == CanAlloc) {
3087 return create<Block>();
3088 }
3089 else {
3090 return nullptr;
3091 }
3092 }
3093
3094
3095#ifdef MCDBGQ_TRACKMEM

Callers

nothing calls this directly

Calls 3

MOODYCAMEL_CONSTEXPR_IFFunction · 0.85

Tested by

no test coverage detected