mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-26 01:46:32 -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
2
check.c
2
check.c
|
|
@ -482,6 +482,8 @@ static int state_check_process(struct snapraid_state* state, int check, int fix,
|
|||
buffermax = diskmax + state->level * 2 + 1;
|
||||
|
||||
buffer = malloc_nofail_vector_align(buffermax, state->block_size, &buffer_alloc);
|
||||
if (!state->opt.skip_self)
|
||||
mtest_vector(buffer, buffermax, state->block_size);
|
||||
|
||||
/* fill up the zero buffer */
|
||||
memset(buffer[buffermax-1], 0, state->block_size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue