++/* Destroys a page, which must be in the current process's
++ page table. Used as a callback for hash_destroy(). */
++static void
++destroy_page (struct hash_elem *p_, void *aux UNUSED)
++{
++ struct page *p = hash_entry (p_, struct page, hash_elem);
++ frame_lock (p);
++ if (p->frame)
++ frame_free (p->frame);
++ free (p);
++}
++
++