X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fthreads%2Finit.c;h=8a037058a7358bea829c75153cfdca313570febd;hp=60d6c46c4a98c3a5a7992f69e8422bf28f96cbd9;hb=bcf9f9ab10a3df0fd12e6e69944307a63967a521;hpb=dd3e6bfbf9bda711367047e4224695d5464fcfb4 diff --git a/src/threads/init.c b/src/threads/init.c index 60d6c46..8a03705 100644 --- a/src/threads/init.c +++ b/src/threads/init.c @@ -53,6 +53,9 @@ bool power_off_when_done; /* -r: Reboot after kernel tasks complete? */ static bool reboot_when_done; +/* -ul: Maximum number of pages to put into palloc's user pool. */ +static size_t user_page_limit = SIZE_MAX; + static void ram_init (void); static void paging_init (void); @@ -88,7 +91,7 @@ main (void) printf ("Pintos booting with %'zu kB RAM...\n", ram_pages * PGSIZE / 1024); /* Initialize memory system. */ - palloc_init (); + palloc_init (user_page_limit); malloc_init (); paging_init ();