manual-core.xml: Fix various xmllint issues.
[valgrind.git] / massif / tests / basic.c
blobf33f9572e347491c502ada542bbc07b7dac75bb3
1 #include <stdlib.h>
3 // Allocate some memory and then deallocate it, to get a nice up-then-down
4 // graph.
6 int main(void)
8 // N=36 gives us 72 snapshots, which fills the text graph nicely.
9 #define N 36
10 int i;
11 int* a[N];
13 for (i = 0; i < N; i++) {
14 a[i] = malloc(400); // 400 is divisible by 16 -- so no slop.
16 for (i = 0; i < N-1; i++) {
17 free(a[i]);
20 return 0;