Rewrite page allocator to support multi-page allocations.
[pintos-anon] / src / threads / thread.c
index eb9646520de0e2b0b2af7c3254451ff5f86eefe1..e85bc164d172094839124f6e818f23c7946957e9 100644 (file)
@@ -112,7 +112,7 @@ thread_create (const char *name, int priority,
   ASSERT (function != NULL);
 
   /* Allocate thread. */
-  t = palloc_get (PAL_ZERO);
+  t = palloc_get_page (PAL_ZERO);
   if (t == NULL)
     return TID_ERROR;
 
@@ -370,7 +370,7 @@ schedule_tail (struct thread *prev)
     {
       ASSERT (prev != cur);
       if (prev != initial_thread)
-        palloc_free (prev);
+        palloc_free_page (prev);
     }
 }