3 #if defined (STACK_SIZE)
4 #define MEMCPY_SIZE (STACK_SIZE / 3)
6 #define MEMCPY_SIZE (1 << 17)
10 void *copy (void *o, const void *i, unsigned l)
12 return memcpy (o, i, l);
18 unsigned char src[MEMCPY_SIZE];
19 unsigned char dst[MEMCPY_SIZE];
21 for (i = 0; i < MEMCPY_SIZE; i++)
22 src[i] = (unsigned char) i, dst[i] = 0;
24 (void) memcpy (dst, src, MEMCPY_SIZE / 128);
26 for (i = 0; i < MEMCPY_SIZE / 128; i++)
27 if (dst[i] != (unsigned char) i)
30 (void) memset (dst, 1, MEMCPY_SIZE / 128);
32 for (i = 0; i < MEMCPY_SIZE / 128; i++)
36 (void) memcpy (dst, src, MEMCPY_SIZE);
38 for (i = 0; i < MEMCPY_SIZE; i++)
39 if (dst[i] != (unsigned char) i)
42 (void) memset (dst, 0, MEMCPY_SIZE);
44 for (i = 0; i < MEMCPY_SIZE; i++)
48 (void) copy (dst, src, MEMCPY_SIZE / 128);
50 for (i = 0; i < MEMCPY_SIZE / 128; i++)
51 if (dst[i] != (unsigned char) i)
54 (void) memset (dst, 0, MEMCPY_SIZE);
56 (void) copy (dst, src, MEMCPY_SIZE);
58 for (i = 0; i < MEMCPY_SIZE; i++)
59 if (dst[i] != (unsigned char) i)