mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Strengthen stream and vector memory tests
This commit is contained in:
parent
05632b9790
commit
17838874bd
6 changed files with 262 additions and 84 deletions
|
|
@ -115,9 +115,23 @@ void **raid_malloc_vector_align(int n, size_t size, size_t align_size, size_t di
|
|||
*/
|
||||
void raid_mrand_vector(unsigned seed, int n, size_t size, void **vv);
|
||||
|
||||
/**
|
||||
* Writes back and invalidates the CPU cache lines covering the memory range.
|
||||
*
|
||||
* This operation is best effort. It does nothing on architectures without a
|
||||
* safe user-space cache invalidation instruction.
|
||||
*/
|
||||
void raid_mcache_flush(void *ptr, size_t size);
|
||||
|
||||
/**
|
||||
* Tests the memory vector for RAM problems.
|
||||
* If a problem is found, it crashes.
|
||||
*
|
||||
* This test is destructive and overwrites the existing buffer contents.
|
||||
* On success, all buffers are guaranteed to be zero-filled.
|
||||
* If a memory error is detected, the function returns immediately and
|
||||
* buffers may be left partially modified.
|
||||
*
|
||||
* Returns 0 on success, or -1 if a memory problem is found.
|
||||
*/
|
||||
int raid_mtest_vector(int n, size_t size, void **vv);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue