mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
Implement COW pages! :^)
sys$fork() now clones all writable regions with per-page COW bits. The pages are then mapped read-only and we handle a PF by COWing the pages. This is quite delightful. Obviously there's lots of work to do still, and it needs better data structures, but the general concept works.
This commit is contained in:
parent
e85c22fe58
commit
2d045d2a64
11 changed files with 271 additions and 97 deletions
|
@ -170,6 +170,30 @@ struct RegisterDump {
|
|||
WORD ss_if_crossRing;
|
||||
} PACKED;
|
||||
|
||||
struct RegisterDumpWithExceptionCode {
|
||||
WORD ss;
|
||||
WORD gs;
|
||||
WORD fs;
|
||||
WORD es;
|
||||
WORD ds;
|
||||
DWORD edi;
|
||||
DWORD esi;
|
||||
DWORD ebp;
|
||||
DWORD esp;
|
||||
DWORD ebx;
|
||||
DWORD edx;
|
||||
DWORD ecx;
|
||||
DWORD eax;
|
||||
WORD exception_code;
|
||||
WORD __exception_code_padding;
|
||||
DWORD eip;
|
||||
WORD cs;
|
||||
WORD __csPadding;
|
||||
DWORD eflags;
|
||||
DWORD esp_if_crossRing;
|
||||
WORD ss_if_crossRing;
|
||||
} PACKED;
|
||||
|
||||
inline constexpr dword pageBaseOf(dword address)
|
||||
{
|
||||
return address & 0xfffff000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue