summaryrefslogtreecommitdiff
path: root/deps/jemalloc/test/unit/pages.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/jemalloc/test/unit/pages.c')
-rw-r--r--deps/jemalloc/test/unit/pages.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/deps/jemalloc/test/unit/pages.c b/deps/jemalloc/test/unit/pages.c
new file mode 100644
index 000000000..d31a35e68
--- /dev/null
+++ b/deps/jemalloc/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));
+}