blob: 643a0dda4ac1b7006d881f0aa15381972f32e28c [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/* Test case by Stephen Tweedie <sct@redhat.com>. */
2#include <unistd.h>
3#include <stdio.h>
4#include <stdlib.h>
5
6int
7main (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}