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?
>
> http://lists.freebsd.org/pipermail/freebsd-stable/2007-August/thread.html#36647

http://lists.freebsd.org/pipermail/freebsd-stable/2007-August/036654.html

     "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.

Sincerely,
-daniel

-- 
http://dannyman.toldme.com
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to