- SORT_XTRACE(2, "Freed sorting buffer");
-}
-
-void
-format_size(byte *buf, u64 x)
-{
- if (x < 10<<10)
- sprintf(buf, "%.1fK", (double)x/(1<<10));
- else if (x < 1<<20)
- sprintf(buf, "%dK", (int)(x/(1<<10)));
- else if (x < 10<<20)
- sprintf(buf, "%.1fM", (double)x/(1<<20));
- else if (x < 1<<30)
- sprintf(buf, "%dM", (int)(x/(1<<20)));
- else if (x < (u64)10<<30)
- sprintf(buf, "%.1fG", (double)x/(1<<30));
- else
- sprintf(buf, "%dG", (int)(x/(1<<30)));