• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "tests.h"
2 
3 void
fill_memory_ex(void * ptr,size_t size,unsigned char start,unsigned char period)4 fill_memory_ex(void *ptr, size_t size, unsigned char start,
5 	       unsigned char period)
6 {
7 	unsigned char *p = ptr;
8 	size_t i;
9 
10 	for (i = 0; i < size; i++) {
11 		p[i] = start + i % period;
12 	}
13 }
14 
15 void
fill_memory(void * ptr,size_t size)16 fill_memory(void *ptr, size_t size)
17 {
18 	fill_memory_ex(ptr, size, 0x80, 0x80);
19 }
20