This is the mail archive of the libc-alpha@sourceware.cygnus.com 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]

Re: Stuff dragged in by crt1 (was Re: Announce: initrd-tftp 0.1)


>Well, I think MALLOC_CHECK_ is really immensely useful :), so I won't
>scrap it.  A move of all the malloc stuff that uses stdio into a
>preload library would certainly be OK with me, but then MALLOC_CHECK_
>wouldn't work with statically linked executables, which are the topic
>at hand.

You could make a libmalloc_check.a, along the same lines as the preload 
library, for them to link against.  But quite honestly nobody cares about 
debugging static binaries - the only time you use them is when you are 
building an image to go in a ROM or on a floppy disk, by which time your code 
should already be working.

>Anyway, I am considering putting it on my TODO to at least move all
>the malloc stuff that uses stdio into a separate source file (the
>single malloc source file has become way too large in any case).  Then
>when linking statically stdio wouldn't be pulled in unless you would
>call __malloc_check_init or malloc_stats directly.

That would be great.

>I'm not sure yet whether all this is worth it.  Comments?

Feedback from embedded people suggests that it is.  I think the only real 
alternative is for them to make their own library containing a malloc without 
the checking stuff.

p.



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