|
Last change
on this file since 2036 was 2036, checked in by bird, 20 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
|
File size:
375 bytes
|
| Line | |
|---|
| 1 | /* Test case by Stephen Tweedie <[email protected]>. */
|
|---|
| 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 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.