3 #include "../memcheck.h"
4 int main (int argc
, char*argv
[])
6 size_t def_size
= 1<<20;
10 if (argc
> 10000) def_size
= def_size
* 2;
13 size_t size
= def_size
;
14 (void) VALGRIND_MAKE_MEM_UNDEFINED(&size
, sizeof(size
));
18 (void) VALGRIND_MAKE_MEM_UNDEFINED(&p
, sizeof(p
));
19 new_p
= realloc(p
, def_size
);
21 (void) VALGRIND_MAKE_MEM_UNDEFINED(&new_p
, sizeof(new_p
));
22 new_p
= realloc(new_p
, def_size
);
24 (void) VALGRIND_MAKE_MEM_UNDEFINED(&new_p
, sizeof(new_p
));
29 (void) VALGRIND_MAKE_MEM_UNDEFINED(&nmemb
, sizeof(nmemb
));
30 new_p
= calloc(nmemb
, def_size
);
36 (void) VALGRIND_MAKE_MEM_UNDEFINED(&alignment
, sizeof(alignment
));
37 new_p
= memalign(alignment
, def_size
);
43 size_t size
= def_size
;
44 (void) VALGRIND_MAKE_MEM_UNDEFINED(&size
, sizeof(size
));
45 new_p
= memalign(nmemb
, size
);
50 size_t size
= def_size
;
51 (void) VALGRIND_MAKE_MEM_UNDEFINED(&size
, sizeof(size
));