1.1 --- a/servers/pipe_server.cc Sun Mar 20 00:17:21 2022 +0100
1.2 +++ b/servers/pipe_server.cc Mon Mar 21 00:04:47 2022 +0100
1.3 @@ -32,12 +32,6 @@
1.4
1.5
1.6
1.7 -/* Default number of pages for pipes. */
1.8 -
1.9 -const unsigned int MEMORY_PAGES = 20;
1.10 -
1.11 -
1.12 -
1.13 /* Server program. */
1.14
1.15 int main(int argc, char *argv[])
1.16 @@ -54,15 +48,21 @@
1.17 return 1;
1.18 }
1.19
1.20 - unsigned int memory_pages = MEMORY_PAGES;
1.21 + unsigned int memory_pages = 0;
1.22
1.23 if (argc > 1)
1.24 memory_pages = atoi(argv[1]);
1.25
1.26 /* Some memory plus infrastructure. */
1.27
1.28 - MemoryIncremental mem(memory_pages);
1.29 - PipeOpenerResource opener(&mem);
1.30 + Memory *mem = NULL;
1.31 +
1.32 + if (memory_pages)
1.33 + mem = new MemoryIncremental(memory_pages);
1.34 + else
1.35 + mem = new MemoryIncremental();
1.36 +
1.37 + PipeOpenerResource opener(mem);
1.38
1.39 /* Register a server associating it with the given object. */
1.40