Commit bbd73800 authored by Rusty Russell's avatar Rusty Russell

alloc: reduce number of large pages to 256.

This reduces the number of huge allocs, which drops test time from 6 minutes to 57 seconds.
parent fbd94d99
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
*/ */
/* We divide the pool into this many large pages (nearest power of 2) */ /* We divide the pool into this many large pages (nearest power of 2) */
#define MAX_LARGE_PAGES (1024UL) #define MAX_LARGE_PAGES (256UL)
/* 32 small pages == 1 large page. */ /* 32 small pages == 1 large page. */
#define BITS_FROM_SMALL_TO_LARGE_PAGE 5 #define BITS_FROM_SMALL_TO_LARGE_PAGE 5
......
...@@ -164,7 +164,7 @@ static void test(unsigned int pool_size) ...@@ -164,7 +164,7 @@ static void test(unsigned int pool_size)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
plan_tests(480); plan_tests(440);
/* Large test. */ /* Large test. */
test(MIN_USEFUL_SIZE * 2); test(MIN_USEFUL_SIZE * 2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment