From: flitterio AT amulet DOT com (Fran Litterio) Subject: RE: Why is cygwin.dll? 17 Jan 1997 16:19:12 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Original-To: "'GNU-WIN32'" Original-Cc: "'emarshal AT common DOT net'" X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63 Original-Sender: owner-gnu-win32 AT cygnus DOT com emarshal AT common DOT 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 AT amulet DOT com franl AT world DOT std DOT com http://world.std.com/~franl/ - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".