Subject: Re: Question about text segments and NetBSD and Solaris 2
To: Brian Buhrow <firstname.lastname@example.org>
From: Chris G. Demetriou <email@example.com>
Date: 07/25/1997 12:57:46
> The question is: If an executable is linked statically, if multiple
> instances are running, are there multiple instances of the text segment for
> that executable in memory at once? In other words, is the OS smart enough
> to know that multiple instances of a given executable can share their text
> segments even if those text segments don't rely on shared objects?
Text of a single executable is shared by multiple instances of that
executable running at the same time, yes.
The big advantage of shared libraries is that, without shared
libraries, text of two _different_ executables can't be shared at all,
when both are running. Shared libraries allow some of that text --
the text contained in the shared libraries -- to be shared.