Subject: RE: Why is cygwin.dll?
From: [email-masked] (Fran Litterio)

17 Jan 1997 16:19:12 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <c=US%a=_%p=Amulet._Inc.%l=[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Original-To: "'GNU-WIN32'" <[email-masked]>
Original-Cc: "[email-masked]'" <[email-masked]>
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63
Original-Sender: [email-masked]

[email-masked] 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
[email-masked]
[email-masked]
http://world.std.com/~franl/

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".