This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: main() static/dynamic


> The big cause of static bloat I am aware of is that malloc brings in all of
> stdio because of being compiling into one file instead of several.  

I have just recently worked on this, and got at least malloc_stats to
compile in a separate file.  It is a rather big (although
straightforward) patch.

However, this is not yet the complete solution, because of the
debugging hooks code, which also uses stdio.  One would have to cut
out functionality, i.e. use

    s = getenv("MALLOC_CHECK_");
    if(s) {
      if(s[0]) mALLOPt(M_CHECK_ACTION, (int)(s[0] - '0'));

etc., if the static version was to do completely without stdio.  To
state it more clearly, debugging functionality of the shared and
static libc would differ.

Also, Uli's recent patch:
	* malloc/malloc.c (_int_free): Add cheap test for some invalid
	block sizes.
would have to be modified, too.

Personally, I dislike static linking, and am not yet convinced all
this is worth the effort.  Or is it?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]