Adds a basic memory test on the used memory buffers.

This commit is contained in:
Andrea Mazzoleni 2013-10-27 17:31:10 +01:00
parent e7804a5f8f
commit 7414f8daec
8 changed files with 67 additions and 0 deletions

View file

@ -66,6 +66,7 @@ static void recovtest(int diskmax, unsigned block_size)
buffermax = diskmax + LEV_MAX * 2 + 2;
buffer = malloc_nofail_vector_align(buffermax, block_size, &buffer_alloc);
mtest_vector(buffer, buffermax, block_size);
data = buffer;
parity = buffer + diskmax;
@ -336,6 +337,7 @@ static void gentest(unsigned diskmax, unsigned block_size)
buffermax = diskmax + LEV_MAX * 2;
buffer = malloc_nofail_vector_align(buffermax, block_size, &buffer_alloc);
mtest_vector(buffer, buffermax, block_size);
/* fill with random */
for(i=0;i<diskmax;++i) {