This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: PATCH: Disable dynamic allocation in atexit


Richard Earnshaw wrote:

> Would it be reasonable to make atexit weakly reference malloc, and only
> call it if it's been linked in?  I can't imagine that there would be
> many applications that would blow the static atexit table that wouldn't
> call malloc at least once from some other location.

Yes, that would work too (assuming, of course, that you make the
corresponding change to link "free" in weakly from __call_exitprocs).
It wouldn't be quite as compact, but it would be more automatic.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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