| 406 | //------------------------------------------------------------------------------ |
| 407 | |
| 408 | static 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 | |
| 419 | static void _ExecutionPlanInit(OpBase *root) { |
| 420 | // If the ExecutionPlan associated with this op hasn't built a record pool yet, do so now. |
no test coverage detected