mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
DARWIN branch, along with a few other minor things. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9197
22 lines
411 B
C
22 lines
411 B
C
#include <stdlib.h>
|
|
|
|
// Allocate some memory and then deallocate it, to get a nice up-then-down
|
|
// graph.
|
|
|
|
int main(void)
|
|
{
|
|
// N=36 gives us 72 snapshots, which fills the text graph nicely.
|
|
#define N 36
|
|
int i;
|
|
int* a[N];
|
|
|
|
for (i = 0; i < N; i++) {
|
|
a[i] = malloc(400); // 400 is divisible by 16 -- so no slop.
|
|
}
|
|
for (i = 0; i < N-1; i++) {
|
|
free(a[i]);
|
|
}
|
|
|
|
return 0;
|
|
}
|