repo.or.cz
/
glibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Update.
[glibc.git]
/
malloc
/
tst-valloc.c
blob
7958d5182236747bea8aef7ce8a3f9efddac8c46
1
/* Test case by Stephen Tweedie <sct@redhat.com>. */
2
#include <unistd.h>
3
#include <stdio.h>
4
#include <stdlib.h>
5
6
int
main
(
void
)
7
{
8
char
*
p
;
9
int
pagesize
=
getpagesize
();
10
int
i
;
11
12
p
=
valloc
(
pagesize
);
13
i
= (
int
)
p
;
14
15
if
((
i
& (
pagesize
-
1
)) !=
0
) {
16
fprintf
(
stderr
,
"Alignment problem: valloc returns %p
\n
"
,
p
);
17
exit
(
1
);
18
}
19
20
return
0
;
21
}