1.1 --- a/dstest_test_server.cc Mon Mar 08 00:29:19 2021 +0100
1.2 +++ b/dstest_test_server.cc Mon Mar 08 00:31:01 2021 +0100
1.3 @@ -42,15 +42,22 @@
1.4 const unsigned int MEMORY_PAGES = REGION_PAGES * 10;
1.5 const unsigned int FILE_PAGES = 20;
1.6
1.7 -int main(void)
1.8 +int main(int argc, char *argv[])
1.9 {
1.10 /* Introduce concurrency control. */
1.11
1.12 ipc_cap_alloc_init();
1.13
1.14 + /* Configure the number of available pages using any argument. */
1.15 +
1.16 + unsigned int memory_pages = MEMORY_PAGES;
1.17 +
1.18 + if (argc > 1)
1.19 + memory_pages = atoi(argv[1]) * REGION_PAGES;
1.20 +
1.21 /* Some memory plus infrastructure. */
1.22
1.23 - Memory mem(MEMORY_PAGES, page(REGION_PAGES));
1.24 + Memory mem(memory_pages, page(REGION_PAGES));
1.25 Accessing accessing;
1.26 Paging paging;
1.27 Pages pages(&mem);
1.28 @@ -71,3 +78,5 @@
1.29 server.start();
1.30 return 0;
1.31 }
1.32 +
1.33 +// vim: tabstop=2 expandtab shiftwidth=2