vm: add a copy-on-write ref count to vm_page

This commit is contained in:
2026-04-01 18:32:32 +01:00
parent f28fab7afa
commit 4143e12a29
+4
View File
@@ -1,6 +1,7 @@
#ifndef KERNEL_VM_H_
#define KERNEL_VM_H_
#include <kernel/atomic.h>
#include <kernel/bitmap.h>
#include <kernel/btree.h>
#include <kernel/locks.h>
@@ -221,6 +222,9 @@ struct vm_page {
};
union {
/* how many vm_areas reference this vm_page. if >0, the page is
* subject to copy-on-write. */
atomic_t p_cow_ref;
uint32_t p_priv2;
};