Subject: Re: Question about text segments and NetBSD and Solaris 2
To: David Edelsohn <>
From: Erik E. Fair <>
List: tech-kern
Date: 07/25/1997 13:29:54
Shared libraries are OK, but can the non-shared-library text segment of a
ZMAGIC executable be shared amongst different invocations of itself?
Probably not much of a savings for "ls" or "cat", but it might amount to
something for "csh", "sh", and "sendmail". I went looking for the answer to
this question in the kernel sources a while ago, but couldn't come up with
a definitive answer.

It looks like NMAGIC is what the gentleman who originally asked is after.
As I remember it, NMAGIC came about so as to be able to take advantage of
the DEC PDP-11's ability to do split Instruction and Data space addressing,
and thereby double an application's available address space from 64K total
for both, to 64K for text, and 64K for data. Of course, this prohibited
self-modifying programs (goodbye von Neumann!), but also made it possible
to share a single text segment amongst all invocations of the same program.

	Erik <>