pub fn cow_fork() -> Result<ProcessId, KernelError>Expand description
Fork with copy-on-write semantics.
Instead of physically copying all user pages, this function:
- Clones the address space metadata (full copy of page tables).
- Registers shared frames in the COW table with ref_count = 2.
When either process writes to a COW page, the page fault handler allocates a private copy and decrements the COW ref count.