Files
ftmemsim-valgrind/massif/tests/peak.c
Nicholas Nethercote 4ddcff03b9 Merged r9101 (make Massif tests work if VG_MIN_MALLOC_SZB==16) from the
DARWIN branch, along with a few other minor things.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9197
2009-02-18 05:14:44 +00:00

14 lines
363 B
C

#include <stdlib.h>
int main(void)
{
int i;
for (i = 0; i < 20; i++) {
int* p; // Sizes are divisible by 16 -- no slop.
p = malloc(1600); // With --peak-inaccuracy=1000, the first 10 of
p = malloc(16); // 'free' calls result in peaks, but after that,
free(p); // only every second one does.
}
return 0;
}