[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/build/uClibc/test/malloc/tst-valloc.c b/ap/build/uClibc/test/malloc/tst-valloc.c
new file mode 100644
index 0000000..643a0dd
--- /dev/null
+++ b/ap/build/uClibc/test/malloc/tst-valloc.c
@@ -0,0 +1,23 @@
+/* Test case by Stephen Tweedie <sct@redhat.com>. */
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ char *p;
+ int pagesize = getpagesize ();
+ int i;
+
+ p = valloc (pagesize);
+ i = (long int) p;
+
+ if ((i & (pagesize-1)) != 0)
+ {
+ fprintf (stderr, "Alignment problem: valloc returns %p\n", p);
+ exit (1);
+ }
+
+ return 0;
+}