mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-01 04:17:02 -05:00
Adds a basic memory test on the used memory buffers.
This commit is contained in:
parent
e7804a5f8f
commit
7414f8daec
8 changed files with 67 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue