Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!linus!wivax!decvax!harpo!seismo!hao!hplabs!sri-unix!cepu!scw@ucla-locus
From: scw%ucla-locus@cepu.UUCP
Newsgroups: net.unix-wizards
Subject: re: PDP-11 loader options
Message-ID: <2096@sri-arpa.UUCP>
Date: Mon, 13-Jun-83 11:45:00 EDT
Article-I.D.: sri-arpa.2096
Posted: Mon Jun 13 11:45:00 1983
Date-Received: Thu, 16-Jun-83 06:12:42 EDT
Lines: 30

From:  Steve Woods 


		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).

 cepu!scw@ucla-locus