Free a PageRef array (sep_cell allocations), unless it's the original leaves.
| 623 | |
| 624 | // Free a PageRef array (sep_cell allocations), unless it's the original leaves. |
| 625 | static void free_children(PageRef *children, int child_count, const PageRef *leaves) { |
| 626 | if (children != leaves) { |
| 627 | for (int j = 0; j < child_count; j++) { |
| 628 | free(children[j].sep_cell); |
| 629 | } |
| 630 | free(children); |
| 631 | } |
| 632 | } |
| 633 | |
| 634 | // Fill an interior page with cells from children[*idx..child_count-2]. |
| 635 | // Updates cell_count, content_offset, ptr_offset, and *idx. |