In article <>,
Ben Pfaff <> wrote:
>"Ancient_Hacker" <> writes:
>> Most OS's map the
>> lower few K of memory to "invalid", so that catches NULL references,
>> and a lot of NULL->field references. But if a field is far enough into
>> the structure, it may map into valid memory addresses.
>Really? On what OSes is the second page of virtual address space
>commonly mapped?
Ancient_Hacker made no reference to a "page" of virtual memory.
His reference was to "the lower few K", which is sufficiently
imprecise to cover paged and non-paged memory models and to cover
protected memory that might be 1 page long, 16 pages long, 42 pages
long...
But to answer your question very specifically:
Silicon Graphics IRIX, starting from some version starting in 4.x,
through to version 6.5.22.
If memory serves me, it was IRIX 6.4 that introduced the models for
which the second page of virtual adress space was NOT commonly mapped.
It wasn't a matter that the addresses were no longer used: what
happened is that the page size got larger for newer hardware models,
requiring that the mapped memory be accessed via the first page (which
was now big enough to cover that address space). IRIX 6.4 -only-
supported models that referenced the memory via the first virtual page;
IRIX 6.5 was a general purpose OS that supported both models that used
the second virtual page for the needed addresses and models that used
the first {larger} virtual page for the same addresses. However, after
6.5.22, support was dropped for all the hardware that used the smaller
page size.
In IRIX 4 through 6.5.22 on models that supported the smaller page
size, the first virtual page of memory is flagged as allowing
no access (no read, no write, no execute), but the second virtual
page of memory was read and write because it was used for SGI's GL
graphics subsystem. In IRIX 6.4 and in IRIX 6.5 on the models with
the larger virtual page, the GL addresses are part of the {larger} first
page; as read and write were required for GL graphics, this had
the size effect of unprotecting memory address 0. If I recall
correctly, the locations near there are initialized to 0... and Yes, they
are writable

--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers