Mail Archives: cygwin/1997/01/17/16:19:12
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".
- Raw text -