projects
/
apple
/
dyld.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
dyld-851.27.tar.gz
[apple/dyld.git]
/
testing
/
test-cases
/
flat-namespace.dtest
/
foo.c
1
2
#include <stdlib.h>
3
#include <string.h>
4
5
char
buffer
[
100000
];
6
char
*
p
=
buffer
;
7
8
void
*
malloc
(
size_t
size
)
9
{
10
// bump ptr allocate and fill second half with '#'
11
char
*
result
=
p
;
12
p
+=
size
;
13
memset
(
result
,
'#'
,
size
);
14
p
= (
char
*)(((
long
)
p
+
15
) & (-
16
));
// 16-byte align next malloc
15
return
result
;
16
}
17
18
void
free
(
void
*
p
)
19
{
20
}
21