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
, 1);
18 (void) VALGRIND_MAKE_MEM_UNDEFINED(&p
, 1);
19 new_p
= realloc(p
, def_size
);
21 (void) VALGRIND_MAKE_MEM_UNDEFINED(&new_p
, 1);
22 new_p
= realloc(new_p
, def_size
);
24 (void) VALGRIND_MAKE_MEM_UNDEFINED(&new_p
, 1);
29 (void) VALGRIND_MAKE_MEM_UNDEFINED(&nmemb
, 1);
30 new_p
= calloc(nmemb
, def_size
);
36 (void) VALGRIND_MAKE_MEM_UNDEFINED(&alignment
, 1);
37 new_p
= memalign(alignment
, def_size
);
43 size_t size
= def_size
;
44 (void) VALGRIND_MAKE_MEM_UNDEFINED(&size
, 1);
45 new_p
= memalign(nmemb
, size
);
50 size_t size
= def_size
;
51 (void) VALGRIND_MAKE_MEM_UNDEFINED(&size
, 1);