PDP-11 loader options

scw%ucla-locus at cepu.UUCP scw%ucla-locus at cepu.UUCP
Tue Jun 14 01:45:00 AEST 1983


From:  Steve Woods <cepu!scw at ucla-locus>


		There is something that I've always wondered about on
				.
				.
				.
	gets too big for -n. I don't understand how or why tho.

Understanding how this works sort of depends on understanding how the PDP-11
addressing hardware works.

The problem is that -n DOES NOT make your program separate I/D. What it
does (or is supposed to) do is make the text (executable) part of your
program pure (read-only) and shareable by other users (so there need
only be 1 copy of it in memory at any time). Note that this also saves
space in /dev/swap as the text of the program is NOT placed there but
rather left in the file from which it is loaded and reloaded from there
if necessary (this is one of the reasons that unlink(2) can fail to
unlink a file).  Due to the way that the PDP-11 addressing hardware
works specifing -n can cost you up to 8k(-2) bytes of addressing space
(the data space is allocated beginning at the next 8k boundry).

The -i option forces separate I/D space (the text portion is pure also)
the I space starts at 0 (the stack uses up 8k bytes starting down from
0177776). Giving you 32 Kw of data space ,28 Kw of data space and 8Kw
of stack space (Note that the stack can grow (down) at the expense of
unallocated data space).

<scw> cepu!scw at ucla-locus



More information about the Comp.unix.wizards mailing list