From 68e8dcc78f6b52d32a02c8b18eb25f753a232070 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Feb 2000 05:25:08 +0000 Subject: Update. 2000-02-21 Ulrich Drepper * malloc/Makefile (tests): Add tst-valloc. * malloc/tst-valloc.c: New file. --- malloc/tst-valloc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 malloc/tst-valloc.c (limited to 'malloc/tst-valloc.c') diff --git a/malloc/tst-valloc.c b/malloc/tst-valloc.c new file mode 100644 index 0000000000..7958d51822 --- /dev/null +++ b/malloc/tst-valloc.c @@ -0,0 +1,21 @@ +/* Test case by Stephen Tweedie . */ +#include +#include +#include + +int main(void) +{ + char *p; + int pagesize = getpagesize (); + int i; + + p = valloc (pagesize); + i = (int) p; + + if ((i & (pagesize-1)) != 0) { + fprintf (stderr, "Alignment problem: valloc returns %p\n", p); + exit(1); + } + + return 0; +} -- cgit v1.2.3