static void merge(void)
Merge the sorted chunks in buf1 into a fully sorted buf2.
unsigned char buf2[DATA_SIZE]
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
static void sort_chunks(void)
Sort each chunk of buf1 using a subprocess.
#define CHUNK_SIZE
Generates about 1 MB of random data that is then divided into 16 chunks.
unsigned char buf1[DATA_SIZE]
static void init(void)
Initialize buf1 with random data, then count the number of instances of each value within it.