Reducing the size of C++ executables - eliminating malloc

Michael Eager eager@eagercon.com
Tue Nov 14 21:30:00 GMT 2006


Olivier Galibert wrote:
> On Sun, Nov 12, 2006 at 02:46:58PM -0800, Michael Eager wrote:
>> It would seem that the place to require the personality
>> routine would be in the routine which causes the stack
>> unwinding, not in every C++ object file, whether needed
>> or not.
> 
> Doesn't that otherwise very valid point of view break when you
> remember that new can throw exceptions?

Folks who want to reduce the size of executables (e.g.,
embedded systems developers) know to avoid including
malloc by using either static or stack allocation
rather than using new.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Newlib mailing list