repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tests/vg_regtest: Always evaluate prerequisite expressions with sh
[valgrind.git]
/
memcheck
/
tests
/
static_malloc.c
blob
22def9e86b546940056298d1f58587fe93ee748b
1
#include <stdio.h>
2
3
static char
buf
[
10000
];
4
static int
bufi
=
0
;
5
void
*
malloc
(
size_t
i
) {
6
bufi
+=
i
;
7
return
buf
+
bufi
-
i
;
8
}
9
10
void
free
(
void
*
ptr
) {
11
}
12
13
int
main
(
void
)
14
{
15
char
*
p
;
16
p
=
malloc
(
10
);
17
p
=
malloc
(
123
);
18
free
(
p
);
19
return
0
;
20
}
21