Hacker News new | past | comments | ask | show | jobs | submit login

Ok, so a page fault is when you try to access a memory address that's not mapped by the MMU, or a write to a memory address that's mapped as read only. The MMU works in pages though, not individual addresses, on x86, standard pages are 4096 bytes, although larger pages are available. A valid page fault is when the OS has allocated that page in the current context, but not actually mapped it; it could be a not yet mapped in page from a memory-mapped file, or a page that was swapped to disk, or a page that was allocated but not yet used (not sure if win95 does that), or a write to a page that is allocated as read-write but is currently mapped as read-only and needs copy-on-write (COW) processing now. An invalid page fault is a read or a write to a page that the MMU doesn't have a mapping for and the OS also doesn't have a mapping for. These errors can be caused by many things; often a programming error leads to pointers being overwritten with unrelated data, when they're dereferenced it could access the wrong data or it could cause an invalid page fault. Hardware errors can also result in bad addresses in a pointer. Sometimes it's unintended interactions between running software or software and hardware.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: