vinyl: count number of slices per run
Currently, there can't be more than one slice per run, but this will change one the single memory level is introduced. Then we will have to count the number of slices per each run so as not to unaccount the same run more than once on each slice deletion. Unfortunately, we can't use vy_run->refs to count the number of slices created per each run, because, although vy_run->refs is only incremented per each slice allocated for the run, this includes slices that were removed from ranges and stay allocated only because of being pinned by open iterators. So we add one more counter to vy_run, slice_count, and introduce new helpers to be used for slice creation/destruction, vy_run_make_slice() and vy_run_destroy_slice(), which inc/dec the counter.
Loading
Please register or sign in to comment