Subject: Re: Question about text segments and NetBSD and Solaris 2
To: None <Vasanth_Kanchan@s3.com>
From: Curt Sampson <email@example.com>
Date: 07/25/1997 14:33:08
On Fri, 25 Jul 1997 Vasanth_Kanchan@s3.com 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 firstname.lastname@example.org Info at http://www.portal.ca/
Internet Portal Services, Inc. Through infinite myst, software reverberates
Vancouver, BC (604) 257-9400 In code possess'd of invisible folly.