feat: implement proper destruction of pages, including for shared pages

This commit is contained in:
2024-12-05 22:23:50 +00:00
parent dd46200256
commit 9aa9cdb91e
4 changed files with 119 additions and 45 deletions

View File

@@ -4,6 +4,12 @@
#include "threads/thread.h"
#include "threads/palloc.h"
struct frame_owner
{
struct thread *owner; /* The thread that owns the frame. */
struct list_elem elem; /* List element for the list of owners. */
};
void frame_init (void);
void *frame_alloc (enum palloc_flags, void *, struct thread *);
void frame_free (void *frame);