OSDN Git Service

libc/inet: set path to resolver file via CPP
[uclinux-h8/uClibc.git] / test / malloc / tst-valloc.c
1 /* Test case by Stephen Tweedie <sct@redhat.com>.  */
2 #include <unistd.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5
6 int
7 main (void)
8 {
9   char *p;
10   int pagesize = getpagesize ();
11   int i;
12
13   p = valloc (pagesize);
14   i = (long int) p;
15
16   if ((i & (pagesize-1)) != 0)
17     {
18       fprintf (stderr, "Alignment problem: valloc returns %p\n", p);
19       exit (1);
20     }
21
22   return 0;
23 }