Update.
[glibc.git] / malloc / tst-valloc.c
blob7958d5182236747bea8aef7ce8a3f9efddac8c46
1 /* Test case by Stephen Tweedie <sct@redhat.com>. */
2 #include <unistd.h>
3 #include <stdio.h>
4 #include <stdlib.h>
6 int main(void)
8 char *p;
9 int pagesize = getpagesize ();
10 int i;
12 p = valloc (pagesize);
13 i = (int) p;
15 if ((i & (pagesize-1)) != 0) {
16 fprintf (stderr, "Alignment problem: valloc returns %p\n", p);
17 exit(1);
20 return 0;