Add data structures for shared executable files along with helper methods for them, w/ G
This commit is contained in:
@@ -23,6 +23,21 @@ struct page_entry {
|
||||
struct hash_elem elem; /* An elem for the hash table. */
|
||||
};
|
||||
|
||||
struct shared_file_entry {
|
||||
struct file *file; /* Pointer to the file. */
|
||||
struct hash pages;
|
||||
int ref_count;
|
||||
|
||||
struct hash_elem elem;
|
||||
};
|
||||
|
||||
struct shared_page_entry {
|
||||
void *upage;
|
||||
void *frame;
|
||||
|
||||
struct hash_elem elem;
|
||||
};
|
||||
|
||||
unsigned page_hash (const struct hash_elem *e, void *aux);
|
||||
bool page_less (const struct hash_elem *a_, const struct hash_elem *b_,
|
||||
void *aux);
|
||||
|
||||
Reference in New Issue
Block a user