Subject: Re: Question about text segments and NetBSD and Solaris 2
To: None <>
From: Curt Sampson <>
List: tech-kern
Date: 07/25/1997 14:33:08
On Fri, 25 Jul 1997 wrote:

>      After looking at the code it seems that the exec system call does not 
>      check for  previous exec's of the same file. So for 5 exec's of a 
>      program there will be 5 X sizeof(.text).

Did you check the VM system as well? As I understand it, exec(),
when loading a program, tells the VM system to map this area of
memory from that disk file. If it does that a second time, one
would think that the VM system should see that there is already a
read-only mapping for those pages, and create a new mapping that
uses the same underlying physical pages and file.


Curt Sampson	   Info at
Internet Portal Services, Inc.	   Through infinite myst, software reverberates
Vancouver, BC  (604) 257-9400	   In code possess'd of invisible folly.