On Sun, Nov 16, 2008 at 2:41 AM, Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 16, 2008 at 12:22:11AM -0800, [EMAIL PROTECTED] wrote:
>> > A statically-linked version of bash would waste significant amounts
>> > of memory, while a dynamically-linked/shared version would ease that
>> > pain. The same applies for any static vs. dynamic program.
>> How so? Wouldn't a single in-memory instance of the bash text
>> segment be shared among all bash processes, across all users?
"In response to the original post: The kernel's ELF
linker/loader for executables will share the text and
read-only segments for static executables."
This is consistent with my understanding. A statically-linked bash
will consume more space on disk, and more memory the first time it is
loaded, but as with any other executable, the executable portion of
the program will be re-used each time another bash is run.
But I am not a developer or a kernel engineer, so if there is a way in
which a statically-compiled bash ends up consuming more memory on each
invocation for some reason, I'd appreciate an explanation as to why.
email@example.com mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"