Files
glibc/malloc/tst-valloc.c
T

24 lines
375 B
C
Raw Normal View History

2000-02-22 05:25:08 +00:00
/* Test case by Stephen Tweedie <sct@redhat.com>. */
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
2000-11-20 17:40:29 +00:00
int
main (void)
2000-02-22 05:25:08 +00:00
{
char *p;
int pagesize = getpagesize ();
int i;
p = valloc (pagesize);
2000-11-20 17:40:29 +00:00
i = (long int) p;
2000-02-22 05:25:08 +00:00
2000-11-20 17:40:29 +00:00
if ((i & (pagesize-1)) != 0)
{
fprintf (stderr, "Alignment problem: valloc returns %p\n", p);
exit (1);
}
2000-02-22 05:25:08 +00:00
return 0;
}