]> mj.ucw.cz Git - libucw.git/blobdiff - lib/sorter/govern.c
Yet another swap-out.
[libucw.git] / lib / sorter / govern.c
index ba59a411adaa038bc9b31104dcc43c1aec2b752d..524b0c905d739734ebe0aab372d67ebf1d336fd6 100644 (file)
@@ -199,6 +199,7 @@ sorter_multiway(struct sort_context *ctx, struct sort_bucket *b)
       cont = sorter_presort(ctx, b, p, (!part_cnt && join) ? join : p);
       part_cnt++;
       total_size += sbuck_size(p);
+      sbuck_swap_out(p);
     }
   while (cont);
   sorter_stop_timer(ctx, &ctx->total_pre_time);
@@ -255,6 +256,7 @@ sorter_multiway(struct sort_context *ctx, struct sort_bucket *b)
        }
       else
        {
+         sbuck_swap_out(out);
          clist_add_tail(&parts, &out->n);
          SORT_TRACE("Multi-way merge pass (%d ways, %s, %dMB/s)", n, F_BSIZE(out), sorter_speed(ctx, sbuck_size(out)));
        }