4 ms·
Does the kernel allocate the physical page when it is read, or only when it is written to? My mental model was that the new VA pages are first mapped to the zer
by rrss 7y ago
Does the kernel allocate the physical page when it is read, or only when it is written to? My mental model was that the new VA pages are first mapped to the zero page as copy on write.
- deleted 7y ago[deleted]
- tedunangst 7y agoI don't know specifically either, but cow mapping a zero page on read seems like an optimization that can backfire. If you write to it later, you need to fix up the page table a second time.