On Fri, Nov 19, 2004, Muli Ben-Yehuda wrote about "Re: memory profiling": > On Thu, Nov 18, 2004 at 10:09:02PM +0000, Oleg Goldshmidt wrote: > > > A related question I don't know the answer to is how dynamic loading > > works on Linux - does it always load the whole library or just the > > part that is needed for my application to run? > > Just the part that is needed. Specifically, the entire library is > mapped into virtual space via mmap(), but only pages that are actually > accessed get faulted in.
(showing my ignorance here, and not really helping Oleg's original question:) Does linux map these pages read-only? Doesn't it need to modify these pages while loading, e.g., to resolve references to other shared libraries, to change jump addresses, and so on? And what does the new "prelink" thing do? -- Nadav Har'El | Friday, Nov 19 2004, 6 Kislev 5765 [EMAIL PROTECTED] |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |Software is like sex, it is better when http://nadav.harel.org.il |it's free -- Linus Torvalds ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
