repo.or.cz
/
memprof.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
src/main.c: Make it possible to pass options to the app under test
[memprof.git]
/
tests
/
testmemprof.c
blob
1c1b99d75e381c279d550cb808fdd97f4a4ff82a
1
#include <stdlib.h>
2
#include <unistd.h>
3
4
void
*
a
()
5
{
6
return
malloc
(
1000
);
7
}
8
9
void
*
b
()
10
{
11
void
*
result
=
a
();
12
free
(
malloc
(
1000
));
13
14
return
result
;
15
}
16
17
int
main
()
18
{
19
char
*
block
;
20
21
free
(
malloc
(
1000
));
22
block
=
b
();
23
block
=
malloc
(
1000
);
24
block
=
b
();
25
free
(
block
);
26
27
return
0
;
28
}