Subject: Re: shared library support
To: None <tech-kern@NetBSD.ORG>
From: None <jiho@postal.c-zone.net>
List: tech-kern
Date: 03/20/1998 01:17:17
On 19-Mar-98 Chuck Cranor wrote:

>> Except maybe for those 7 bss pages (28K) you attribute to ld.so.  I'm having
>> a hard time deducing what those pages are filled with, considering how tiny
>> my test program is and how few links it entails.
>
> it is ld.so's malloc().   see the file:
>
> gnu/usr.bin/ld/rtld/malloc.c ... look for:
>
> #define NPOOLPAGES      (32*1024/pagesz)
>
> i don't know how much of that gets used, you'd have to 
> ask Paul Kranenburg (pk), as he is the expert in this area.

Yes, and not much of it should be used in this case, so that still doesn't
explain why so many pages.  It must do something temporary, and then just hang
on to the pages to no purpose.

I've often thought that both shared libraries and kernel modules ought to be
handled by a single, unified linker in the kernel.  I know that's heresy, but
it would avoid a lot of silliness.  And it would probably be better than having
one malloc() built into crt0.o along with the system call stubs.


>> And although from your test, code sharing appears to work "as expected" with
>> UVM, we don't really know about Mach yet.
>
> ... but it is easy enough to find out.  someone just needs to repeat
> the test under the oldvm.   i do not have time to do it myself.

Easy for you since you've done it.  I never have, so there's a learning curve. 
But I will find the time, because I need to know.


--Jim Howard  <jiho@mail.c-zone.net>


----------------------------------
E-Mail: jiho@mail.c-zone.net
Date: 20-Mar-98
Time: 01:01:57

This message was sent by XFMail
----------------------------------