From: flitterio@amulet.com (Fran Litterio)
Subject: RE: Why is cygwin.dll?
17 Jan 1997 16:19:12 -0800
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <c=US%a=_%p=Amulet._Inc.%l=JAGUAR-970117151739Z-1685.cygnus.gnu-win32@jaguar.amulet.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Original-To: "'GNU-WIN32'" <gnu-win32@cygnus.com>
Original-Cc: "'emarshal@common.net'" <emarshal@common.net>
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63
Original-Sender: owner-gnu-win32@cygnus.com

emarshal@common.net wrote:
>
>As an alternative approach, has anyone considered breaking cygwin.dll into
>functional portions, i.e. groups of functions which are functionally
>dependant upon each other are broken into separate dll's? The gain here
>would be that the entire 3M dll wouldn't necessarily be loaded all at
>once; for any given application (say, bash) you might only need 1.5M of
>the code in that dll. By breaking them into separate dll's, you win with
>memory.

DLLs that contain a lot of code don't waste memory unless all of the
code needs to run at nearly the same time.  NT maps code pages from
executables and DLLs directly from the filesystem.  You are not wasting
any swap space (i.e., virtual memory) by linking your app against a DLL
containing lots of code.  Only those pages of the DLL that contain
recently executed code are in physical memory.  If they are not executed
for a while, they get replaced with pages of executables that do need to
execute.  This is no different than if you statically linked the library
into your app.

Of course, data pages are a different story.  Does anyone know if NT
does copy-on-write?  I've heard that NT won't let you put data into a
DLL -- only pointers to data (but aren't pointers data too?).  If anyone
can clarify this for me, I'd appreciate it.
--
Francis Litterio
franl@amulet.com
franl@world.std.com
http://world.std.com/~franl/

-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
