MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / _ExecutionPlan_InitRecordPool

Function _ExecutionPlan_InitRecordPool

src/execution_plan/execution_plan.c:408–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406//------------------------------------------------------------------------------
407
408static inline void _ExecutionPlan_InitRecordPool(ExecutionPlan *plan) {
409 if(plan->record_pool) return;
410 // Initialize record pool.
411 // Determine Record size to inform ObjectPool allocation
412 uint entries_count = raxSize(plan->record_map);
413 uint rec_size = sizeof(_Record) + (sizeof(Entry) * entries_count);
414
415 // Create a data block with initial capacity of 256 records.
416 plan->record_pool = ObjectPool_New(256, rec_size, (fpDestructor)Record_FreeEntries);
417}
418
419static void _ExecutionPlanInit(OpBase *root) {
420 // If the ExecutionPlan associated with this op hasn't built a record pool yet, do so now.

Callers 1

_ExecutionPlanInitFunction · 0.85

Calls 1

ObjectPool_NewFunction · 0.85

Tested by

no test coverage detected