segmentation fault

M

Michael Wojcik

Except that address could belong to the operating system, and
"read-protection" in terms of protecting memory from being read from
user programs is somewhat more common. Also, the address could simply
not be mapped.

All true, but I'll agree with Dave that read protection is less
common, both in the general sense that pages which allow read but not
write are more common than the converse, and specifically in this
case because there are systems which map a read-only page of zeroes
at address zero (to accomodate broken programs which treat address
zero as containing an empty string, for example). On such platforms,
address 97 (assuming a reasonable page size) would be readable but
not writable.

For smaller systems without general-purpose MMUs, too, you're likely
to find readable but unwritable addresses (eg for ROM), so there too
read-protection could be considered "not so widely used".

All that said, though, I think on contemporary general-purpose
systems it's common to find that some portions of a program's address
space are unreadable. Obviously that's necessary for architectures
like the AS/400, where all programs share a single address space but
object protection is provided by the OS, but it's also typical of
architectures that use per-process address spaces, for reasons of
efficiency.

--
Michael Wojcik (e-mail address removed)

The antics which have been drawn together in this book are huddled here
for mutual protection like sheep. If they had half a wit apiece each
would bound off in many directions, to unsimplify the target.
-- Walt Kelly
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top