Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I came across the following on http://tldp.org/LDP/tlk/mm/memory.html

If the faulting virtual address is invalid this means that the process has attempted to access a virtual address that it should not have. Maybe the application has gone wrong in some way, for example writing to random addresses in memory. In this case the operating system will terminate it, protecting the other processes in the system from this rogue process.

Now, my doubt is related to this phrase

"faulting virtual address is invalid".

What is exactly meant by this? How can a *virtual address be invalid*? After all, any 32 bit value (on a 32 bit machine) would correspond to some 'valid' address in the virtual address space.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

any 32 bit value (on a 32 bit machine) would correspond to some 'valid' address in the virtual address space

Incorrect. Page entries can point to physical memory that doesn't exist or is marked off-limits, or they can contain an invalid pattern.

share|improve this answer
    
Ironically, the answer is there in the same sentence from which I picked up the quote. "If the faulting virtual address is invalid this means that the process has attempted to access a virtual address that it should not have." That explains what the author really means by a 'faulting virtual address'. –  gjain Apr 25 '12 at 19:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.