| 192 | } |
| 193 | |
| 194 | int memtest_compare(unsigned long *l, size_t bytes, int interactive) { |
| 195 | unsigned long words = bytes/sizeof(unsigned long)/2; |
| 196 | unsigned long w, *l1, *l2; |
| 197 | |
| 198 | assert((bytes & 4095) == 0); |
| 199 | l1 = l; |
| 200 | l2 = l1+words; |
| 201 | for (w = 0; w < words; w++) { |
| 202 | if (*l1 != *l2) { |
| 203 | if (interactive) { |
| 204 | printf("\n*** MEMORY ERROR DETECTED: %p != %p (%lu vs %lu)\n", |
| 205 | (void*)l1, (void*)l2, *l1, *l2); |
| 206 | exit(1); |
| 207 | } |
| 208 | return 1; |
| 209 | } |
| 210 | l1 ++; |
| 211 | l2 ++; |
| 212 | if ((w & 0xffff) == 0 && interactive) |
| 213 | memtest_progress_step(w,words,'='); |
| 214 | } |
| 215 | return 0; |
| 216 | } |
| 217 | |
| 218 | int memtest_compare_times(unsigned long *m, size_t bytes, int pass, int times, |
| 219 | int interactive) |
no test coverage detected