Add 469782 to NEWS
[valgrind.git] / none / tests / bug129866.c
blobda13aca87baca7c78ffd018d46442775c808377f
2 #include <stdlib.h>
3 #include <stdio.h>
5 char * touch_malloc (int size)
7 char * result;
8 int i;
9 result = malloc (size);
10 for (i = 0; i < size; i++)
11 *(result + i) = 'a';
13 return result;
15 char * touch_realloc (char * ptr, int size)
17 char * result;
18 int i;
19 result = realloc (ptr, size);
20 for (i = 0; i < size; i++)
21 *(result + i) = 'a';
23 return result;
26 int main ( void )
28 char *a1, *b1, *a2 __attribute__((unused)), *b2 __attribute__((unused));
29 printf("started\n");
30 a1 = touch_malloc(1600000) ;
31 b1 = touch_malloc(200000) ;
32 a2 = touch_realloc(a1, 1601600) ;
33 b2 = touch_realloc(b1, 200000) ;
34 printf("success\n");
35 return 0;