Free a PageRef array (sep_cell allocations), unless it's the original leaves.
| 641 | |
| 642 | // Free a PageRef array (sep_cell allocations), unless it's the original leaves. |
| 643 | static void free_children(PageRef *children, int child_count, const PageRef *leaves) { |
| 644 | if (children != leaves) { |
| 645 | for (int j = 0; j < child_count; j++) { |
| 646 | free(children[j].sep_cell); |
| 647 | } |
| 648 | free(children); |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | // Fill an interior page with cells from children[*idx..child_count-2]. |
| 653 | // Updates cell_count, content_offset, ptr_offset, and *idx. |