Subject: Re: Why is cygwin.dll?
From: [email-masked] (Jim Balter)

16 Jan 1997 23:57:30 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01Gold (WinNT; I)
Original-To: [email-masked]
Original-CC: [email-masked]
Original-Sender: [email-masked]

[email-masked] wrote:
> 
> Hi, you wrote:
> 
> : Silly me; you and Barry Roberts are of course right to point out the
> : very significant shared memory aspect that I omitted to mention.
> : A staticly linked executable can of course only share among multiple
> : instances of itself; no pages are shared across executables
> : (static library routines won't even be at the same location within a
> : page).  I used to live and breath unix kernel paging code; too much time
> : out of those trenches, I guess :-)
> 
> I'm not sure if my English is good enough to understand whether the last
> remark means "yes" or "no",

Sorry; I get wordy.  I think I meant yes.  Whichever "agree" is . :-)

> since modern unixes (like linux, but also VMS)
> do both sharing and demand paging, but then, you might have worked on one
> of those really old ones 8-)

I think I saw my first unix in '74, but I wasn't writing kernel code
(drivers) 'til 1977, unix V.6 on pdp-11/40 with 28K,
Mashey shell (the one before the Bourne shell), before the invention of
environment variables, before typedef was added to C and a =+ b was
switched around to a += b, the kernel used pointers and ints pretty much
interchangeably without error messages, etc.  Is that really old
enough? :-)

> : Paging brings up an interesting issue: a well-organized shared library
> : can reduce memory usage and paging by localizing functions on the same
> : page that end to call each other.  I don't know how many people bother
> : to do this, or if there are automated tools (there ought to be).
> 
> For analyzing maybe gprof? But I don't know how to force ld to a specific
> order, if possible at all on the various platforms, or even a portable one.

I was thinking something more static, just a call tree.  And I was
assuming that the linker would load modules in the order named.

> Not to mention alignment and cache issues...

I don't see the issue; I'm just talking about the library being
organized in some order better than alphabetical or random.

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