summaryrefslogtreecommitdiffstats
path: root/test/unit/pages.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-12-04 06:48:43 (GMT)
committerJason Evans <jasone@canonware.com>2016-12-04 06:48:43 (GMT)
commitf1f76357313e7dcad7262f17a48ff0a2e005fcdc (patch)
tree826e5a42621cbd8abc9e7473437f223faccc2b0c /test/unit/pages.c
parent0110fa8451af905affd77c3bea0d545fee2251b2 (diff)
parent2d1bb8980fff829c58dabbf122224f577879a32c (diff)
downloadjemalloc-4.4.0.zip
jemalloc-4.4.0.tar.gz
jemalloc-4.4.0.tar.bz2
Merge branch 'rc-4.4.0'4.4.0
Diffstat (limited to 'test/unit/pages.c')
-rw-r--r--test/unit/pages.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/unit/pages.c b/test/unit/pages.c
new file mode 100644
index 0000000..d31a35e
--- /dev/null
+++ b/test/unit/pages.c
@@ -0,0 +1,27 @@
+#include "test/jemalloc_test.h"
+
+TEST_BEGIN(test_pages_huge)
+{
+ bool commit;
+ void *pages;
+
+ commit = true;
+ pages = pages_map(NULL, PAGE, &commit);
+ assert_ptr_not_null(pages, "Unexpected pages_map() error");
+
+ assert_false(pages_huge(pages, PAGE),
+ "Unexpected pages_huge() result");
+ assert_false(pages_nohuge(pages, PAGE),
+ "Unexpected pages_nohuge() result");
+
+ pages_unmap(pages, PAGE);
+}
+TEST_END
+
+int
+main(void)
+{
+
+ return (test(
+ test_pages_huge));
+}