Use same loop count for writing and memset'ing in test_mem to have same precision...