huangcm
2024-12-18 9d29be7f7249789d6ffd0440067187a9f040c2cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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));
}